broadband-bearer,icera: fix CID matching for unsolicited IPDPACT responses

This commit is contained in:
Ben Chan
2012-08-19 23:26:14 -07:00
committed by Aleksander Morgado
parent 2b5fb682c6
commit 7b13b5e1c0
2 changed files with 6 additions and 3 deletions

View File

@@ -280,7 +280,7 @@ ipdpact_received (MMAtSerialPort *port,
return; return;
/* Setup context */ /* Setup context */
ctx.cid = 0; ctx.cid = cid;
ctx.status = MM_BROADBAND_BEARER_ICERA_CONNECTION_STATUS_UNKNOWN; ctx.status = MM_BROADBAND_BEARER_ICERA_CONNECTION_STATUS_UNKNOWN;
switch (status) { switch (status) {

View File

@@ -670,13 +670,13 @@ dial_3gpp_ready (MMBroadbandModem *modem,
if (!MM_BROADBAND_BEARER_GET_CLASS (ctx->self)->dial_3gpp_finish (ctx->self, if (!MM_BROADBAND_BEARER_GET_CLASS (ctx->self)->dial_3gpp_finish (ctx->self,
res, res,
&error)) { &error)) {
/* Clear CID when it failed to connect. */
ctx->self->priv->cid = 0;
g_simple_async_result_take_error (ctx->result, error); g_simple_async_result_take_error (ctx->result, error);
detailed_connect_context_complete_and_free (ctx); detailed_connect_context_complete_and_free (ctx);
return; return;
} }
/* Keep CID around while connected */
ctx->self->priv->cid = ctx->cid;
if (MM_BROADBAND_BEARER_GET_CLASS (ctx->self)->get_ip_config_3gpp && if (MM_BROADBAND_BEARER_GET_CLASS (ctx->self)->get_ip_config_3gpp &&
MM_BROADBAND_BEARER_GET_CLASS (ctx->self)->get_ip_config_3gpp_finish) { MM_BROADBAND_BEARER_GET_CLASS (ctx->self)->get_ip_config_3gpp_finish) {
@@ -732,6 +732,9 @@ initialize_pdp_context_ready (MMBaseModem *modem,
return; return;
} }
/* Keep CID around after initializing the PDP context in order to
* handle corresponding unsolicited PDP activation responses. */
ctx->self->priv->cid = ctx->cid;
MM_BROADBAND_BEARER_GET_CLASS (ctx->self)->dial_3gpp (ctx->self, MM_BROADBAND_BEARER_GET_CLASS (ctx->self)->dial_3gpp (ctx->self,
ctx->modem, ctx->modem,
ctx->primary, ctx->primary,