mirror of git://git.sysmocom.de/ofono
voicecall: Remove sim_state_watch on atom unregister
This commit is contained in:
parent
a3dcd49711
commit
758826919b
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue