diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-11-18 12:07:59 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-11-18 12:09:42 -0600 |
commit | 16834cc0058f1f5559b79e2a4cc07a159522d8ef (patch) | |
tree | 32375ded2a2a80f3f72bfb1b0e58345eb8f6810b /plugins | |
parent | 8c52019c1ac7dddfee0dc9227662506f136fc1f9 (diff) | |
download | ofono-16834cc0058f1f5559b79e2a4cc07a159522d8ef.tar.bz2 |
Fix: modem _disable needs to send the CFUN
For HSO driver
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/hso.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/hso.c b/plugins/hso.c index 972b78b1..938ce576 100644 --- a/plugins/hso.c +++ b/plugins/hso.c @@ -125,9 +125,14 @@ static int hso_enable(struct ofono_modem *modem) static void cfun_disable(gboolean ok, GAtResult *result, gpointer user_data) { struct ofono_modem *modem = user_data; + struct hso_data *data = ofono_modem_get_data(modem); DBG(""); + g_at_chat_shutdown(data->chat); + g_at_chat_unref(data->chat); + data->chat = NULL; + if (ok) ofono_modem_set_powered(modem, FALSE); } @@ -144,12 +149,7 @@ static int hso_disable(struct ofono_modem *modem) g_at_chat_send(data->chat, "AT+CFUN=0", NULL, cfun_disable, modem, NULL); - g_at_chat_shutdown(data->chat); - - g_at_chat_unref(data->chat); - data->chat = NULL; - - return 0; + return -EINPROGRESS; } static void hso_pre_sim(struct ofono_modem *modem) |