diff options
author | Jeevaka Badrappan <jeevaka.badrappan@elektrobit.com> | 2011-04-06 07:26:41 -0700 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2011-04-07 22:18:05 -0500 |
commit | 758826919be4ef7197c265ad3aaa4626e136043a (patch) | |
tree | 1f1114102401b6ab0556bde1d742ae4e5b02c816 | |
parent | a3dcd49711274bb3a1a14e54e106b2126150155d (diff) | |
download | ofono-758826919be4ef7197c265ad3aaa4626e136043a.tar.bz2 |
voicecall: Remove sim_state_watch on atom unregister
-rw-r--r-- | src/voicecall.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/voicecall.c b/src/voicecall.c index 469b939d..6d8d7a40 100644 --- a/src/voicecall.c +++ b/src/voicecall.c @@ -2203,11 +2203,18 @@ static void voicecall_unregister(struct ofono_atom *atom) const char *path = __ofono_atom_get_path(atom); GSList *l; + if (vc->sim_state_watch) { + ofono_sim_remove_state_watch(vc->sim, vc->sim_state_watch); + vc->sim_state_watch = 0; + } + if (vc->sim_watch) { __ofono_modem_remove_atom_watch(modem, vc->sim_watch); vc->sim_watch = 0; } + vc->sim = NULL; + if (vc->dial_req) dial_request_finish(vc); @@ -2246,12 +2253,6 @@ static void voicecall_remove(struct ofono_atom *atom) vc->new_en_list = NULL; } - if (vc->sim_state_watch) { - ofono_sim_remove_state_watch(vc->sim, vc->sim_state_watch); - vc->sim_state_watch = 0; - vc->sim = NULL; - } - if (vc->tone_source) { g_source_remove(vc->tone_source); vc->tone_source = 0; |