aboutsummaryrefslogtreecommitdiff
path: root/src/mm-broadband-modem-mbim.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2020-11-26 23:22:57 +0100
committerAleksander Morgado <aleksander@aleksander.es>2021-02-23 11:35:11 +0000
commitbc449cbe87ccebccbe35f926e88a2dd110832ddf (patch)
treed307b1d18c36fb620a28fa88174ba127a369a18f /src/mm-broadband-modem-mbim.c
parent5ce97abd73da12b64393be798f2c294d29be2705 (diff)
charsets: make translit optional in utf8_to_unpacked_gsm()
If the conversion is not fully compatible, the user of the method needs to request transliteration enabled explicitly in order to avoid returning errors in this method.
Diffstat (limited to 'src/mm-broadband-modem-mbim.c')
-rw-r--r--src/mm-broadband-modem-mbim.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mm-broadband-modem-mbim.c b/src/mm-broadband-modem-mbim.c
index c073bb29..ba37cdb7 100644
--- a/src/mm-broadband-modem-mbim.c
+++ b/src/mm-broadband-modem-mbim.c
@@ -4777,10 +4777,9 @@ ussd_encode (const gchar *command,
guint32 packed_len = 0;
*scheme = MM_MODEM_GSM_USSD_SCHEME_7BIT;
- gsm = mm_charset_utf8_to_unpacked_gsm (command, &len);
+ gsm = mm_charset_utf8_to_unpacked_gsm (command, FALSE, &len, error);
if (!gsm) {
- g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_UNSUPPORTED,
- "Failed to encode USSD command in GSM7 charset");
+ g_prefix_error (error, "Failed to encode USSD command in GSM7 charset: ");
return NULL;
}
packed = mm_charset_gsm_pack (gsm, len, 0, &packed_len);