aboutsummaryrefslogtreecommitdiff
path: root/plugins/zte/mm-broadband-modem-zte.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/zte/mm-broadband-modem-zte.c')
-rw-r--r--plugins/zte/mm-broadband-modem-zte.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/plugins/zte/mm-broadband-modem-zte.c b/plugins/zte/mm-broadband-modem-zte.c
index 64549cd8..08bbed83 100644
--- a/plugins/zte/mm-broadband-modem-zte.c
+++ b/plugins/zte/mm-broadband-modem-zte.c
@@ -187,6 +187,19 @@ modem_after_sim_unlock_context_step (GTask *task)
task);
}
+static gboolean
+after_sim_unlock_wait_cb (GTask *task)
+{
+ /* Attempt to disable floods of "+ZUSIMR:2" unsolicited responses that
+ * eventually fill up the device's buffers and make it crash. Normally
+ * done during probing, but if the device has a PIN enabled it won't
+ * accept the +CPMS? during the probe and we have to do it here.
+ */
+ modem_after_sim_unlock_context_step (task);
+
+ return G_SOURCE_REMOVE;
+}
+
static void
modem_after_sim_unlock (MMIfaceModem *self,
GAsyncReadyCallback callback,
@@ -201,12 +214,7 @@ modem_after_sim_unlock (MMIfaceModem *self,
task = g_task_new (self, NULL, callback, user_data);
g_task_set_task_data (task, ctx, g_free);
- /* Attempt to disable floods of "+ZUSIMR:2" unsolicited responses that
- * eventually fill up the device's buffers and make it crash. Normally
- * done during probing, but if the device has a PIN enabled it won't
- * accept the +CPMS? during the probe and we have to do it here.
- */
- modem_after_sim_unlock_context_step (task);
+ g_timeout_add_seconds (1, (GSourceFunc)after_sim_unlock_wait_cb, task);
}
/*****************************************************************************/