From 3adf7a07ca7ce63ebff27ab818d7f28be1bd227f Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 17 Aug 2010 00:49:23 +0200 Subject: [PATCH] atmodem: Allow missing DCS parameter in USSD result --- drivers/atmodem/ussd.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/atmodem/ussd.c b/drivers/atmodem/ussd.c index 13b049f..1e1fc25 100644 --- a/drivers/atmodem/ussd.c +++ b/drivers/atmodem/ussd.c @@ -73,15 +73,15 @@ static void cusd_parse(GAtResult *result, struct ofono_ussd *ussd) if (!g_at_result_iter_next_string(&iter, &content)) goto out; - if (!g_at_result_iter_next_number(&iter, &dcs)) - goto out; - - if (!cbs_dcs_decode(dcs, &udhi, NULL, &charset, - &compressed, NULL, &iso639)) - goto out; - - if (udhi || compressed || iso639) - goto out; + if (g_at_result_iter_next_number(&iter, &dcs)) { + if (!cbs_dcs_decode(dcs, &udhi, NULL, &charset, + &compressed, NULL, &iso639)) + goto out; + + if (udhi || compressed || iso639) + goto out; + } else + charset = SMS_CHARSET_7BIT; if (charset == SMS_CHARSET_7BIT) converted = convert_gsm_to_utf8((const guint8 *) content, -- 2.7.4