broadband-bearer: don't choke if an APN wasn't specified when parsing PDP list

Change-Id: I1535fdae0659ae049b4a795d85017abe1fea6be8
This commit is contained in:
Nathan Williams
2012-03-16 14:53:18 +01:00
committed by Aleksander Morgado
parent 94a110960e
commit 6f22eb6a63
+2 -1
View File
@@ -857,7 +857,8 @@ parse_pdp_list (MMBaseModem *self,
mm_dbg ("Found PDP context with CID %u and no APN",
pdp->cid);
cid = pdp->cid;
} else if (g_str_equal (pdp->apn, ctx->self->priv->apn)) {
} else if (ctx->self->priv->apn &&
g_str_equal (pdp->apn, ctx->self->priv->apn)) {
/* Found a PDP context with the same CID, we'll use it. */
mm_dbg ("Found PDP context with CID %u for APN '%s'",
pdp->cid, pdp->apn);