summaryrefslogtreecommitdiffstats
path: root/drivers/atmodem
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2009-07-15 11:44:37 -0500
committerDenis Kenzior <denkenz@gmail.com>2009-07-15 11:49:06 -0500
commit2effe636670efbcb443c88254c6a3e29c43d315a (patch)
treeb26caf3875d2c355dffed29ed5450efdc9ffabdf /drivers/atmodem
parent22ad7dc7c54966dd50c0b3907a61cd8447a63846 (diff)
downloadofono-2effe636670efbcb443c88254c6a3e29c43d315a.tar.bz2
Fix CNMI parsing, it uses ranges not just a list
Diffstat (limited to 'drivers/atmodem')
-rw-r--r--drivers/atmodem/sms.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/atmodem/sms.c b/drivers/atmodem/sms.c
index 0878a1e0..2343cede 100644
--- a/drivers/atmodem/sms.c
+++ b/drivers/atmodem/sms.c
@@ -619,11 +619,15 @@ static void at_cnmi_query_cb(gboolean ok, GAtResult *result, gpointer user_data)
goto out;
for (opt = 0; opt < 5; opt++) {
+ int min, max;
+
if (!g_at_result_iter_open_list(&iter))
goto out;
- while (g_at_result_iter_next_number(&iter, &mode))
- cnmi_opts[opt] |= 1 << mode;
+ while (g_at_result_iter_next_range(&iter, &min, &max)) {
+ for (mode = min; mode <= max; mode++)
+ cnmi_opts[opt] |= 1 << mode;
+ }
if (!g_at_result_iter_close_list(&iter))
goto out;