From 1ebf59b61b0cdab75f8a554fed495f4b58fa0f96 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 18 Nov 2009 12:08:26 -0600 Subject: Fix: modem _disable needs to send the CFUN For MBM driver --- plugins/mbm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/mbm.c b/plugins/mbm.c index 2a284287..3581b19a 100644 --- a/plugins/mbm.c +++ b/plugins/mbm.c @@ -216,9 +216,14 @@ static int mbm_enable(struct ofono_modem *modem) static void cfun_disable(gboolean ok, GAtResult *result, gpointer user_data) { struct ofono_modem *modem = user_data; + struct mbm_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); } @@ -235,11 +240,6 @@ static int mbm_disable(struct ofono_modem *modem) g_at_chat_send(data->chat, "AT+CFUN=4", NULL, cfun_disable, modem, NULL); - g_at_chat_shutdown(data->chat); - - g_at_chat_unref(data->chat); - data->chat = NULL; - return -EINPROGRESS; } -- cgit v1.2.3