mirror of git://git.sysmocom.de/ofono
drivers: switch g_convert usage to ell
This commit is contained in:
parent
b99c15f8e2
commit
77271f33d2
|
@ -29,6 +29,7 @@
|
||||||
#include <errno.h>
|
#include <errno.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>
|
||||||
|
@ -86,16 +87,12 @@ static gboolean parse_text(GAtResultIter *iter, char **str, int encoding)
|
||||||
if (g_at_result_iter_next_hexstring(iter, &hex, &len) == FALSE)
|
if (g_at_result_iter_next_hexstring(iter, &hex, &len) == FALSE)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
utf8 = g_convert((const gchar*) hex, len,
|
utf8 = l_utf8_from_ucs2be(hex, len);
|
||||||
"UTF-8//TRANSLIT", "UCS-2BE",
|
if (!utf8)
|
||||||
NULL, NULL, NULL);
|
return FALSE;
|
||||||
|
|
||||||
if (utf8) {
|
*str = utf8;
|
||||||
*str = utf8;
|
return TRUE;
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -103,7 +100,7 @@ static gboolean parse_text(GAtResultIter *iter, char **str, int encoding)
|
||||||
* characters, same as in UTF8
|
* characters, same as in UTF8
|
||||||
*/
|
*/
|
||||||
if (g_at_result_iter_next_string(iter, &string)) {
|
if (g_at_result_iter_next_string(iter, &string)) {
|
||||||
*str = g_strdup(string);
|
*str = l_strdup(string);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,12 +184,12 @@ static void at_cpbr_notify(GAtResult *result, gpointer user_data)
|
||||||
adtype, secondtext, email,
|
adtype, secondtext, email,
|
||||||
sip_uri, tel_uri);
|
sip_uri, tel_uri);
|
||||||
|
|
||||||
g_free(text);
|
l_free(text);
|
||||||
g_free(group);
|
l_free(group);
|
||||||
g_free(secondtext);
|
l_free(secondtext);
|
||||||
g_free(email);
|
l_free(email);
|
||||||
g_free(sip_uri);
|
l_free(sip_uri);
|
||||||
g_free(tel_uri);
|
l_free(tel_uri);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue