diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-02-14 09:07:21 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-02-23 11:35:11 +0000 |
commit | ab4c31ec0b2c79285e24b9a117ff5e5c21f8fd71 (patch) | |
tree | 101ef588731316323a9ef596d7eca6f4b1584af1 | |
parent | 6bc07b4b1487cfc6e171ec1f2c34958f17202a8b (diff) |
cinterion: rework mno decoding to use str_to_utf8()
-rw-r--r-- | plugins/cinterion/mm-modem-helpers-cinterion.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/cinterion/mm-modem-helpers-cinterion.c b/plugins/cinterion/mm-modem-helpers-cinterion.c index 543303a5..cf18ea69 100644 --- a/plugins/cinterion/mm-modem-helpers-cinterion.c +++ b/plugins/cinterion/mm-modem-helpers-cinterion.c @@ -1523,9 +1523,15 @@ mm_cinterion_provcfg_response_to_cid (const gchar *response, mno = mm_get_string_unquoted_from_match_info (match_info, 1); if (mno && modem_family == MM_CINTERION_MODEM_FAMILY_IMT) { - mno = mm_charset_take_and_convert_to_utf8 (mno, charset); - mm_obj_dbg (log_object, "current mno: %s", mno); + gchar *mno_utf8; + + mno_utf8 = mm_modem_charset_str_to_utf8 (mno, -1, charset, FALSE, error); + if (!mno_utf8) + return FALSE; + g_free (mno); + mno = mno_utf8; } + mm_obj_dbg (log_object, "current mno: %s", mno ? mno : "none"); /* for Cinterion LTE modules, some CID numbers have special meaning. * This is dictated by the chipset and by the MNO: |