From: Tomasz Gregorek <[email protected]>
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.
---
plugins/mbm.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/plugins/mbm.c b/plugins/mbm.c
index dca9bd8..38583ac 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);
--
1.7.1
_______________________________________________
ofono mailing list
[email protected]
http://lists.ofono.org/listinfo/ofono