diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-12-02 17:55:18 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-12-02 19:11:35 -0600 |
commit | b77c63b73a15fad0835320266b4cb51545c13e53 (patch) | |
tree | 9d76d4d529027caac0a4a8a323f4890ae9e7884e /plugins/g1.c | |
parent | 9c63c7dc202d09ccbaff0f93abae92845942b8ae (diff) | |
download | ofono-b77c63b73a15fad0835320266b4cb51545c13e53.tar.bz2 |
Fix: Convert G1 plugin to new world order
Diffstat (limited to 'plugins/g1.c')
-rw-r--r-- | plugins/g1.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/g1.c b/plugins/g1.c index 75e6913e..0ad27540 100644 --- a/plugins/g1.c +++ b/plugins/g1.c @@ -65,7 +65,14 @@ static int g1_probe(struct ofono_modem *modem) static void g1_remove(struct ofono_modem *modem) { + GAtChat *chat = ofono_modem_get_data(modem); + DBG(""); + + if (chat) { + g_at_chat_unref(chat); + ofono_modem_set_data(modem, NULL); + } } static void cfun_set_on_cb(gboolean ok, GAtResult *result, gpointer user_data) @@ -139,6 +146,8 @@ static int g1_disable(struct ofono_modem *modem) DBG(""); /* power down modem */ + g_at_chat_cancel_all(chat); + g_at_chat_unregister_all(chat); g_at_chat_send(chat, "AT+CFUN=0", NULL, cfun_set_off_cb, modem, NULL); return -EINPROGRESS; |