diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-12-02 17:55:40 -0600 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-12-02 19:11:35 -0600 |
commit | 21b9d4f0177325d4f0fd07fd21a70f7abcf98877 (patch) | |
tree | 74154da5ad3ceca01576af0af06cf7976e87f6f6 /plugins/hso.c | |
parent | b77c63b73a15fad0835320266b4cb51545c13e53 (diff) | |
download | ofono-21b9d4f0177325d4f0fd07fd21a70f7abcf98877.tar.bz2 |
Fix: Convert HSO plugin to new world order
Diffstat (limited to 'plugins/hso.c')
-rw-r--r-- | plugins/hso.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/hso.c b/plugins/hso.c index 6293d84f..e30a2c5e 100644 --- a/plugins/hso.c +++ b/plugins/hso.c @@ -72,6 +72,7 @@ static void hso_remove(struct ofono_modem *modem) ofono_modem_set_data(modem, NULL); + g_at_chat_unref(data->control); g_free(data); } @@ -166,10 +167,6 @@ static void cfun_disable(gboolean ok, GAtResult *result, gpointer user_data) g_at_chat_unref(data->control); data->control = NULL; - g_at_chat_shutdown(data->app); - g_at_chat_unref(data->app); - data->app = NULL; - if (ok) ofono_modem_set_powered(modem, FALSE); } @@ -183,6 +180,13 @@ static int hso_disable(struct ofono_modem *modem) if (!data->control) return 0; + g_at_chat_cancel_all(data->control); + g_at_chat_unregister_all(data->control); + + g_at_chat_shutdown(data->app); + g_at_chat_unref(data->app); + data->app = NULL; + g_at_chat_send(data->control, "AT+CFUN=0", none_prefix, cfun_disable, modem, NULL); |