From eec0dbfb85def6fb6ea6073c8a52896d019e379f Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 18 Nov 2009 17:10:25 -0600 Subject: [PATCH] Fix: Use none_prefix Do not eat up unsolicited notifications that might arrive as a result of CFUN=0 --- plugins/hso.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/hso.c b/plugins/hso.c index e4347bd..de73bb2 100644 --- a/plugins/hso.c +++ b/plugins/hso.c @@ -42,6 +42,8 @@ #include #include +static const char *none_prefix[] = { NULL }; + struct hso_data { GAtChat *chat; }; @@ -118,7 +120,7 @@ static int hso_enable(struct ofono_modem *modem) if (getenv("OFONO_AT_DEBUG")) g_at_chat_set_debug(data->chat, hso_debug, NULL); - g_at_chat_send(data->chat, "AT+CFUN=1", NULL, + g_at_chat_send(data->control, "AT+CFUN=1", none_prefix, cfun_enable, modem, NULL); return 0; @@ -145,10 +147,10 @@ static int hso_disable(struct ofono_modem *modem) DBG("%p", modem); - if (!data->chat) + if (!data->control) return 0; - g_at_chat_send(data->chat, "AT+CFUN=0", NULL, + g_at_chat_send(data->control, "AT+CFUN=0", none_prefix, cfun_disable, modem, NULL); return -EINPROGRESS; -- 2.7.4