diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-11-18 17:10:25 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-11-18 18:07:10 -0600 |
commit | eec0dbfb85def6fb6ea6073c8a52896d019e379f (patch) | |
tree | 5a22ae7a50c9157096f62892068c6c692b841f91 /plugins/hso.c | |
parent | 0a9766cbab145e10e5ed990911181b3c84724c6c (diff) | |
download | ofono-eec0dbfb85def6fb6ea6073c8a52896d019e379f.tar.bz2 |
Fix: Use none_prefix
Do not eat up unsolicited notifications that might arrive as a result of
CFUN=0
Diffstat (limited to 'plugins/hso.c')
-rw-r--r-- | plugins/hso.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/hso.c b/plugins/hso.c index e4347bd2..de73bb2e 100644 --- a/plugins/hso.c +++ b/plugins/hso.c @@ -42,6 +42,8 @@ #include <ofono/gprs-context.h> #include <ofono/log.h> +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; |