summaryrefslogtreecommitdiffstats
path: root/plugins/huawei.c
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2011-01-19 11:07:43 -0200
committerMarcel Holtmann <marcel@holtmann.org>2011-01-19 14:21:29 +0100
commitedaff4b50503d07255ab567957e6abf492f747a2 (patch)
treef51396b528fb1c3ea6d8ef950fb19395a01e127c /plugins/huawei.c
parenta2bad5b65bf2b5b2b5e77c4f775f74e61d3b9649 (diff)
downloadofono-edaff4b50503d07255ab567957e6abf492f747a2.tar.bz2
huawei: do not set timer more than once
If a "^SYSINFO" arrives after the timer for query_sim_locked() has been set up, it'd would set a new timer, signaling a sim state change more than once.
Diffstat (limited to 'plugins/huawei.c')
-rw-r--r--plugins/huawei.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/huawei.c b/plugins/huawei.c
index d6a9d689..b4b74367 100644
--- a/plugins/huawei.c
+++ b/plugins/huawei.c
@@ -289,7 +289,8 @@ static void sysinfo_cb(gboolean ok, GAtResult *result, gpointer user_data)
data->sim_poll_timeout = g_timeout_add_seconds(2,
query_sim_state,
modem);
- } else if (sim_state == HUAWEI_SIM_STATE_INVALID_OR_LOCKED) {
+ } else if (sim_state == HUAWEI_SIM_STATE_INVALID_OR_LOCKED &&
+ !data->sim_poll_timeout) {
data->sim_poll_timeout = g_timeout_add_seconds(2,
query_sim_locked,
modem);