bearer-qmi: don't try to gather connection settings if we didn't connect

This commit is contained in:
Aleksander Morgado
2013-03-21 17:29:49 +01:00
parent aa84ce98f7
commit ad757bd3bc

View File

@@ -690,28 +690,32 @@ connect_context_step (ConnectContext *ctx)
return; return;
} }
case CONNECT_STEP_GET_CURRENT_SETTINGS: { case CONNECT_STEP_GET_CURRENT_SETTINGS:
QmiMessageWdsGetCurrentSettingsInput *input; /* If one of IPv4 or IPv6 succeeds, get IP configuration */
QmiClientWds *client; if (ctx->packet_data_handle_ipv4 || ctx->packet_data_handle_ipv6) {
QmiMessageWdsGetCurrentSettingsInput *input;
QmiClientWds *client;
if (ctx->running_ipv4) if (ctx->running_ipv4)
client = ctx->client_ipv4; client = ctx->client_ipv4;
else if (ctx->running_ipv6) else if (ctx->running_ipv6)
client = ctx->client_ipv6; client = ctx->client_ipv6;
else else
g_assert_not_reached (); g_assert_not_reached ();
mm_dbg ("Getting IP configuration..."); mm_dbg ("Getting IP configuration...");
input = build_get_current_settings_input (ctx); input = build_get_current_settings_input (ctx);
qmi_client_wds_get_current_settings (client, qmi_client_wds_get_current_settings (client,
input, input,
45, 45,
ctx->cancellable, ctx->cancellable,
(GAsyncReadyCallback)get_current_settings_ready, (GAsyncReadyCallback)get_current_settings_ready,
ctx); ctx);
qmi_message_wds_get_current_settings_input_unref (input); qmi_message_wds_get_current_settings_input_unref (input);
return; return;
} }
/* Just fall down */
ctx->step++;
case CONNECT_STEP_LAST: case CONNECT_STEP_LAST:
/* If one of IPv4 or IPv6 succeeds, we're connected */ /* If one of IPv4 or IPv6 succeeds, we're connected */