From d97912f5f14df3b5be81e4359a8314adeb1be594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= Date: Fri, 19 Jul 2019 12:27:45 +0200 Subject: [PATCH] atmodem: gprs-context: parse list-less CGDATA response The Quectel M95 and MC60 modems respond to AT+CGDATA=? with a single +CGDATA="PPP", but the callback in gprs-context expects a list of protocols. Avoid falling back to the old-style ATD*99 by not expecting a list of protocols for serial quectel modems. --- drivers/atmodem/gprs-context.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/atmodem/gprs-context.c b/drivers/atmodem/gprs-context.c index 4e623a63..f9f3c0ab 100644 --- a/drivers/atmodem/gprs-context.c +++ b/drivers/atmodem/gprs-context.c @@ -409,9 +409,11 @@ static void at_cgdata_test_cb(gboolean ok, GAtResult *result, goto error; } - if (!g_at_result_iter_open_list(&iter)) { - DBG("no list found"); - goto error; + if (gcd->vendor != OFONO_VENDOR_QUECTEL_SERIAL) { + if (!g_at_result_iter_open_list(&iter)) { + DBG("no list found"); + goto error; + } } while (!found && g_at_result_iter_next_string(&iter, &data_type)) {