projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d104573
)
mbm: Remove data->reopen_source timer before setting up new one
author
Tomasz Gregorek
<tomasz.gregorek@stericsson.com>
Fri, 14 Jan 2011 13:35:15 +0000
(14:35 +0100)
committer
Marcel Holtmann
<marcel@holtmann.org>
Fri, 14 Jan 2011 13:40:47 +0000
(14:40 +0100)
Check if there is a timer running already and remove it before
creating a new one. This will prevent calling reopen_callback() more
than if mbm_disconnect() is called more than once.
plugins/mbm.c
patch
|
blob
|
history
diff --git
a/plugins/mbm.c
b/plugins/mbm.c
index
38583ac
..
4048f6a
100644
(file)
--- a/
plugins/mbm.c
+++ b/
plugins/mbm.c
@@
-351,6
+351,9
@@
static void mbm_disconnect(gpointer user_data)
data->data_port = NULL;
/* Waiting for the +CGEV: ME DEACT might also work */
+ if (data->reopen_source > 0)
+ g_source_remove(data->reopen_source);
+
data->reopen_source = g_timeout_add_seconds(1, reopen_callback, modem);
}