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;
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;
}