diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-19 10:41:50 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-19 16:22:40 +0200 |
commit | 487cd29d8bdae22af6c2ee897615279e92f77eb7 (patch) | |
tree | 14b582b05c8fd97a910fb6078d4d816698f070b2 | |
parent | c63f42a20cc26fb89bfbe5d14e9b2b4437f41102 (diff) |
hso: unsolicited %IPDPACT may come before the AT command reply
-rw-r--r-- | plugins/option/mm-broadband-bearer-hso.c | 11 |
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[] = { |