summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2016-08-22 22:17:21 +0200
committerAleksander Morgado <aleksander@aleksander.es>2016-10-12 13:24:09 +0200
commit75ad9bf98be802bec12b0c8ba0ed9fd95ce8902f (patch)
tree587d2a2ed488300cababa4e6d6736a81aac1cd2f
parente64b964e8e2eb43b5555088a53890640865edbe8 (diff)
downloadModemManager-75ad9bf98be802bec12b0c8ba0ed9fd95ce8902f.tar.gz
broadband-bearer: more detailed logging of why a given CID is chosen
-rw-r--r--src/mm-broadband-bearer.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c
index eb8ce1981..6c910c7c7 100644
--- a/src/mm-broadband-bearer.c
+++ b/src/mm-broadband-bearer.c
@@ -785,10 +785,17 @@ parse_cid_range (MMBaseModem *modem,
/* Found exact PDP type? */
if (format->pdp_type == ctx->ip_family) {
- if (ctx->max_cid < format->max_cid)
+ gchar *ip_family_str;
+
+ ip_family_str = mm_bearer_ip_family_build_string_from_mask (format->pdp_type);
+ if (ctx->max_cid < format->max_cid) {
cid = ctx->max_cid + 1;
- else
+ mm_dbg ("Using empty CID %u with PDP type '%s'", cid, ip_family_str);
+ } else {
cid = ctx->max_cid;
+ mm_dbg ("Re-using CID %u (max) with PDP type '%s'", cid, ip_family_str);
+ }
+ g_free (ip_family_str);
break;
}
}
@@ -798,8 +805,7 @@ parse_cid_range (MMBaseModem *modem,
if (cid == 0) {
mm_dbg ("Defaulting to CID=1");
cid = 1;
- } else
- mm_dbg ("Using CID %u", cid);
+ }
ctx->cid = cid;
return TRUE;