aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/option/mm-broadband-bearer-hso.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/plugins/option/mm-broadband-bearer-hso.c b/plugins/option/mm-broadband-bearer-hso.c
index 491b4659..612177cc 100644
--- a/plugins/option/mm-broadband-bearer-hso.c
+++ b/plugins/option/mm-broadband-bearer-hso.c
@@ -468,10 +468,8 @@ activate_ready (MMBaseModem *modem,
return;
}
- /* We will now setup a timeout and keep the context in the bearer's private.
- * Reports of modem being connected will arrive via unsolicited messages. */
- g_assert (ctx->self->priv->connect_pending == NULL);
- ctx->self->priv->connect_pending = ctx;
+ /* We will now setup a timeout so that we don't wait forever to get the
+ * connection on */
ctx->self->priv->connect_pending_id = g_timeout_add_seconds (30,
(GSourceFunc)connect_timed_out_cb,
ctx->self);
@@ -516,6 +514,11 @@ authenticate_ready (MMBaseModem *modem,
(GAsyncReadyCallback)activate_ready,
ctx);
g_free (command);
+
+ /* We will now keep the context in the bearer's private.
+ * Reports of modem being connected will arrive via unsolicited messages. */
+ g_assert (ctx->self->priv->connect_pending == NULL);
+ ctx->self->priv->connect_pending = ctx;
}
const gchar *auth_commands[] = {