atmodem: Use l_util_hexstring instead of encode_hex

This commit is contained in:
Denis Kenzior 2018-12-27 13:48:12 -06:00
parent 5e1471d3eb
commit 305ae9ba84
1 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,7 @@
#include <stdio.h> #include <stdio.h>
#include <glib.h> #include <glib.h>
#include <ell/ell.h>
#include <ofono/log.h> #include <ofono/log.h>
#include <ofono/modem.h> #include <ofono/modem.h>
@ -921,7 +922,7 @@ static void construct_ack_pdu(struct sms_data *d)
if (len != tpdu_len) if (len != tpdu_len)
goto err; goto err;
d->cnma_ack_pdu = encode_hex(pdu, tpdu_len, 0); d->cnma_ack_pdu = l_util_hexstring(pdu, tpdu_len);
if (d->cnma_ack_pdu == NULL) if (d->cnma_ack_pdu == NULL)
goto err; goto err;
@ -1318,7 +1319,7 @@ static void at_sms_remove(struct ofono_sms *sms)
{ {
struct sms_data *data = ofono_sms_get_data(sms); struct sms_data *data = ofono_sms_get_data(sms);
g_free(data->cnma_ack_pdu); l_free(data->cnma_ack_pdu);
if (data->timeout_source > 0) if (data->timeout_source > 0)
g_source_remove(data->timeout_source); g_source_remove(data->timeout_source);