mirror of git://git.sysmocom.de/ofono
Fix CNMI parsing, it uses ranges not just a list
This commit is contained in:
parent
22ad7dc7c5
commit
2effe63667
|
@ -619,11 +619,15 @@ static void at_cnmi_query_cb(gboolean ok, GAtResult *result, gpointer user_data)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
for (opt = 0; opt < 5; opt++) {
|
for (opt = 0; opt < 5; opt++) {
|
||||||
|
int min, max;
|
||||||
|
|
||||||
if (!g_at_result_iter_open_list(&iter))
|
if (!g_at_result_iter_open_list(&iter))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
while (g_at_result_iter_next_number(&iter, &mode))
|
while (g_at_result_iter_next_range(&iter, &min, &max)) {
|
||||||
cnmi_opts[opt] |= 1 << mode;
|
for (mode = min; mode <= max; mode++)
|
||||||
|
cnmi_opts[opt] |= 1 << mode;
|
||||||
|
}
|
||||||
|
|
||||||
if (!g_at_result_iter_close_list(&iter))
|
if (!g_at_result_iter_close_list(&iter))
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in New Issue