diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2013-03-21 17:29:49 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2013-03-21 17:31:11 +0100 |
commit | ad757bd3bc722bd8ee9d015d1a6b45f689fc1628 (patch) | |
tree | ff0ca65db06542fd87b3d9c874bd76b0ecafdfb7 /src | |
parent | aa84ce98f7a94085b81ec581a2ef45db77ee5080 (diff) |
bearer-qmi: don't try to gather connection settings if we didn't connect
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-bearer-qmi.c | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c index e31f7381..8f9568d7 100644 --- a/src/mm-bearer-qmi.c +++ b/src/mm-bearer-qmi.c @@ -690,28 +690,32 @@ connect_context_step (ConnectContext *ctx) return; } - case CONNECT_STEP_GET_CURRENT_SETTINGS: { - QmiMessageWdsGetCurrentSettingsInput *input; - QmiClientWds *client; + case CONNECT_STEP_GET_CURRENT_SETTINGS: + /* If one of IPv4 or IPv6 succeeds, get IP configuration */ + if (ctx->packet_data_handle_ipv4 || ctx->packet_data_handle_ipv6) { + QmiMessageWdsGetCurrentSettingsInput *input; + QmiClientWds *client; - if (ctx->running_ipv4) - client = ctx->client_ipv4; - else if (ctx->running_ipv6) - client = ctx->client_ipv6; - else - g_assert_not_reached (); - - mm_dbg ("Getting IP configuration..."); - input = build_get_current_settings_input (ctx); - qmi_client_wds_get_current_settings (client, - input, - 45, - ctx->cancellable, - (GAsyncReadyCallback)get_current_settings_ready, - ctx); - qmi_message_wds_get_current_settings_input_unref (input); - return; - } + if (ctx->running_ipv4) + client = ctx->client_ipv4; + else if (ctx->running_ipv6) + client = ctx->client_ipv6; + else + g_assert_not_reached (); + + mm_dbg ("Getting IP configuration..."); + input = build_get_current_settings_input (ctx); + qmi_client_wds_get_current_settings (client, + input, + 45, + ctx->cancellable, + (GAsyncReadyCallback)get_current_settings_ready, + ctx); + qmi_message_wds_get_current_settings_input_unref (input); + return; + } + /* Just fall down */ + ctx->step++; case CONNECT_STEP_LAST: /* If one of IPv4 or IPv6 succeeds, we're connected */ |