diff options
author | Tomasz Gregorek <tomasz.gregorek@stericsson.com> | 2011-01-14 14:34:48 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-01-14 14:39:37 +0100 |
commit | d104573d545016ee1b36e6e884e434ecb241cd1b (patch) | |
tree | 616d613612e8decd887c8bf66c92b8f43354e6fa /plugins/mbm.c | |
parent | 00a2335ed4d093d9f70845f7d56d4eb6d390c651 (diff) | |
download | ofono-d104573d545016ee1b36e6e884e434ecb241cd1b.tar.bz2 |
mbm: Adding timer removal to mbm_remove()
In case the modem is disconnected during enabling process, mbm_disconnect()
will set up data->reopen_source timer. This timer needs to be
removed in mbm_remove() to stop execution of reopen_callback() after
hardware disconnection.
Diffstat (limited to 'plugins/mbm.c')
-rw-r--r-- | plugins/mbm.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mbm.c b/plugins/mbm.c index dca9bd82..38583ac9 100644 --- a/plugins/mbm.c +++ b/plugins/mbm.c @@ -91,6 +91,11 @@ static void mbm_remove(struct ofono_modem *modem) DBG("%p", modem); + if (data->reopen_source > 0) { + g_source_remove(data->reopen_source); + data->reopen_source = 0; + } + ofono_modem_set_data(modem, NULL); g_at_chat_unref(data->data_port); |