aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c')
-rw-r--r--openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
index 311ab94cc..17dc659bb 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c
@@ -812,11 +812,14 @@ uint32_t bsc_mgcp_extract_ci(const char *str)
return CI_UNUSED;
}
- if (sscanf(res, "I: %u", &ci) != 1) {
+ if (sscanf(res, "I: %x", &ci) != 1) {
LOGP(DMGCP, LOGL_ERROR, "Failed to parse CI in msg '%s'\n", str);
return CI_UNUSED;
}
+ if (ci == CI_UNUSED)
+ LOGP(DMGCP, LOGL_ERROR, "CI field '%s' parsed as reserved value CI_UNUSED\n", str);
+
return ci;
}