From 7fd09123f899c8d9a9d82af6a2fde2e503eb1b47 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Wed, 24 Oct 2012 11:30:06 +0200 Subject: broadband-bearer: log all found PDP contexts before looking for a match --- src/mm-broadband-bearer.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c index 341f9886..967d078b 100644 --- a/src/mm-broadband-bearer.c +++ b/src/mm-broadband-bearer.c @@ -916,6 +916,8 @@ parse_pdp_list (MMBaseModem *modem, } cid = 0; + + /* Show all found PDP contexts in debug log */ mm_dbg ("Found '%u' PDP contexts", g_list_length (pdp_list)); for (l = pdp_list; l; l = g_list_next (l)) { MM3gppPdpContext *pdp = l->data; @@ -924,6 +926,12 @@ parse_pdp_list (MMBaseModem *modem, pdp->cid, mm_bearer_ip_family_get_string (pdp->pdp_type), pdp->apn ? pdp->apn : ""); + } + + /* Look for the exact PDP context we want */ + for (l = pdp_list; l; l = g_list_next (l)) { + MM3gppPdpContext *pdp = l->data; + if (pdp->pdp_type == mm_bearer_properties_get_ip_type (mm_bearer_peek_config (MM_BEARER (ctx->self)))) { /* PDP with no APN set? we may use that one if not exact match found */ if (!pdp->apn || !pdp->apn[0]) { -- cgit v1.2.3-70-g09d2