diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-11-02 14:35:49 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-11-02 14:58:21 -0500 |
commit | 6e6409ff421f86c5b6cd96a9cfe825d7bdcb6891 (patch) | |
tree | 37a0834405fe11310e18477730f9eb6e55129e3e /plugins/smart-messaging.c | |
parent | 49eee4006a7da28da10d112ee6e0ca961e87de5d (diff) | |
download | ofono-6e6409ff421f86c5b6cd96a9cfe825d7bdcb6891.tar.gz |
smart-messaging: Free agent when sms atom exits
Diffstat (limited to 'plugins/smart-messaging.c')
-rw-r--r-- | plugins/smart-messaging.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/smart-messaging.c b/plugins/smart-messaging.c index 535e2fd4..114e24b3 100644 --- a/plugins/smart-messaging.c +++ b/plugins/smart-messaging.c @@ -134,6 +134,12 @@ static void smart_messaging_cleanup(gpointer user) struct smart_messaging *sm = user; DBG("%p", sm); + + sm->sms = NULL; + + sms_agent_free(sm->agent); + + ofono_modem_remove_interface(sm->modem, SMART_MESSAGING_INTERFACE); } static void sms_watch(struct ofono_atom *atom, @@ -144,15 +150,10 @@ static void sms_watch(struct ofono_atom *atom, DBusConnection *conn = ofono_dbus_get_connection(); if (cond == OFONO_ATOM_WATCH_CONDITION_UNREGISTERED) { - DBG("unregistered"); - sm->sms = NULL; - g_dbus_unregister_interface(conn, ofono_modem_get_path(sm->modem), SMART_MESSAGING_INTERFACE); - ofono_modem_remove_interface(sm->modem, - SMART_MESSAGING_INTERFACE); return; } |