diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-12-28 08:01:05 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-12-28 08:01:05 +0100 |
commit | 95598e2e37463e95555c296a7ae023e7ded46408 (patch) | |
tree | b09a1e9d3e4a8898e11293728684ad7083386ca5 | |
parent | 1b0ab2ea60eef1fb8d9b9c185d2700dab562be0d (diff) |
sierra: pass data port to parent's 3GPP dialling sequence
-rw-r--r-- | plugins/sierra/mm-broadband-bearer-sierra.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/sierra/mm-broadband-bearer-sierra.c b/plugins/sierra/mm-broadband-bearer-sierra.c index 07c999ad..d46d83a3 100644 --- a/plugins/sierra/mm-broadband-bearer-sierra.c +++ b/plugins/sierra/mm-broadband-bearer-sierra.c @@ -52,7 +52,7 @@ typedef struct { guint cid; GCancellable *cancellable; GSimpleAsyncResult *result; - gboolean is_net_data_port; + MMPort *data; Dial3gppStep step; } Dial3gppContext; @@ -62,6 +62,7 @@ dial_3gpp_context_complete_and_free (Dial3gppContext *ctx) g_simple_async_result_complete_in_idle (ctx->result); g_object_unref (ctx->cancellable); g_object_unref (ctx->result); + g_object_unref (ctx->data); g_object_unref (ctx->primary); g_object_unref (ctx->modem); g_object_unref (ctx->self); @@ -180,7 +181,7 @@ dial_3gpp_context_step (Dial3gppContext *ctx) return; case DIAL_3GPP_STEP_AUTHENTICATE: - if (ctx->is_net_data_port) { + if (!MM_IS_AT_SERIAL_PORT (ctx->data)) { gchar *command; const gchar *user; const gchar *password; @@ -247,7 +248,7 @@ dial_3gpp_context_step (Dial3gppContext *ctx) } case DIAL_3GPP_CONNECT: - if (ctx->is_net_data_port) { + if (!MM_IS_AT_SERIAL_PORT (ctx->data)) { gchar *command; command = g_strdup_printf ("!SCACT=1,%d", ctx->cid); @@ -269,7 +270,7 @@ dial_3gpp_context_step (Dial3gppContext *ctx) MM_BROADBAND_BEARER (ctx->self), ctx->modem, ctx->primary, - NULL, /* parent won't use it anyway */ + ctx->data, ctx->cid, ctx->cancellable, (GAsyncReadyCallback)parent_dial_3gpp_ready, @@ -307,7 +308,7 @@ dial_3gpp (MMBroadbandBearer *self, user_data, dial_3gpp); ctx->cancellable = g_object_ref (cancellable); - ctx->is_net_data_port = !MM_IS_AT_SERIAL_PORT (data); + ctx->data = g_object_ref (data); ctx->step = DIAL_3GPP_STEP_FIRST; dial_3gpp_context_step (ctx); |