mirror of git://git.sysmocom.de/ofono
Fix: Some modems report PDP_type in a list
This commit is contained in:
parent
5cfe541582
commit
ffd7c1920a
|
@ -232,6 +232,8 @@ static void at_cgdcont_test_cb(gboolean ok, GAtResult *result,
|
|||
g_at_result_iter_init(&iter, result);
|
||||
|
||||
while (!found && g_at_result_iter_next(&iter, "+CGDCONT:")) {
|
||||
gboolean in_list = FALSE;
|
||||
|
||||
if (!g_at_result_iter_open_list(&iter))
|
||||
continue;
|
||||
|
||||
|
@ -241,11 +243,17 @@ static void at_cgdcont_test_cb(gboolean ok, GAtResult *result,
|
|||
if (!g_at_result_iter_close_list(&iter))
|
||||
continue;
|
||||
|
||||
if (g_at_result_iter_open_list(&iter))
|
||||
in_list = TRUE;
|
||||
|
||||
if (!g_at_result_iter_next_string(&iter, &pdp_type))
|
||||
continue;
|
||||
|
||||
if (in_list && !g_at_result_iter_close_list(&iter))
|
||||
continue;
|
||||
|
||||
/* We look for IP PDPs */
|
||||
if (!strcmp(pdp_type, "IP"))
|
||||
if (g_str_equal(pdp_type, "IP"))
|
||||
found = TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue