From dd6ae48d192272e4bfabcd5159747abfacf3908b Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Thu, 25 Oct 2018 13:51:57 -0500 Subject: [PATCH] atmodem: Make sure to use none_prefix Otherwise all unsolicited notifications would also be consumed when invoking +CGAUTH/+CGDCONT --- drivers/atmodem/lte.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/atmodem/lte.c b/drivers/atmodem/lte.c index f4ac10be..4157b02f 100644 --- a/drivers/atmodem/lte.c +++ b/drivers/atmodem/lte.c @@ -41,6 +41,8 @@ #include "atmodem.h" +static const char *none_prefix[] = { NULL }; + struct lte_driver_data { GAtChat *chat; struct ofono_lte_default_attach_info pending_info; @@ -93,7 +95,7 @@ static void at_lte_set_default_attach_info_cb(gboolean ok, GAtResult *result, ldd->pending_info.password); cbd = cb_data_ref(cbd); - if (g_at_chat_send(ldd->chat, buf, NULL, + if (g_at_chat_send(ldd->chat, buf, none_prefix, at_lte_set_auth_cb, cbd, cb_data_unref) > 0) return; @@ -112,7 +114,7 @@ static void at_lte_set_default_attach_info(const struct ofono_lte *lte, cbd->user = ldd; memcpy(&ldd->pending_info, info, sizeof(ldd->pending_info)); - if (g_at_chat_send(ldd->chat, buf, NULL, + if (g_at_chat_send(ldd->chat, buf, none_prefix, at_lte_set_default_attach_info_cb, cbd, cb_data_unref) > 0) goto end;