aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-11-23 13:16:28 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:23 +0100
commit1453f352bca34f8592a33954d628acfec66d4336 (patch)
tree0e0ca545b52f40d547ba5183b47ebfa4ea9bdc5f /src
parentca15a10629b4d977177bc8406e833b49a5f5aee2 (diff)
iface-modem: relaunch init when being unlocked
Diffstat (limited to 'src')
-rw-r--r--src/mm-iface-modem.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index 511d1760..681a9ba0 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -147,6 +147,13 @@ unlock_check_context_free (UnlockCheckContext *ctx)
g_free (ctx);
}
+static gboolean
+restart_initialize_idle (MMIfaceModem *self)
+{
+ mm_iface_modem_initialize (self, NULL, NULL);
+ return FALSE;
+}
+
static void
set_lock_status (MMIfaceModem *self,
MmGdbusModem *skeleton,
@@ -163,6 +170,8 @@ set_lock_status (MMIfaceModem *self,
g_object_set (self,
MM_IFACE_MODEM_STATE, MM_MODEM_STATE_DISABLED,
NULL);
+
+ g_idle_add ((GSourceFunc)restart_initialize_idle, self);
}
} else {
if (old_lock == MM_MODEM_LOCK_UNKNOWN) {