diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2017-12-05 18:14:08 +0100 |
---|---|---|
committer | Daniel Willmann <dwillmann@sysmocom.de> | 2018-01-30 18:59:28 +0100 |
commit | a683912c50b7848d7cd5bc506741221a1eb16f69 (patch) | |
tree | 92d7c10785a5a62d174de674d070baefddd6ac45 | |
parent | f7dffb02d96aafd10698bb4ed0de51ff40a6c156 (diff) |
mgcp: Treat ConnID as hex
Change-Id: I53ce632d641bbf16919e3b44812e712ef6f54a45
-rw-r--r-- | openbsc/src/libmgcp/mgcp_protocol.c | 4 | ||||
-rw-r--r-- | openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c index 7cc62560d..0305f5678 100644 --- a/openbsc/src/libmgcp/mgcp_protocol.c +++ b/openbsc/src/libmgcp/mgcp_protocol.c @@ -509,10 +509,10 @@ static int verify_call_id(const struct mgcp_endpoint *endp, static int verify_ci(const struct mgcp_endpoint *endp, const char *_ci) { - uint32_t ci = strtoul(_ci, NULL, 10); + uint32_t ci = strtoul(_ci, NULL, 16); if (ci != endp->ci) { - LOGP(DMGCP, LOGL_ERROR, "ConnectionIdentifiers do not match on 0x%x. %u != %s\n", + LOGP(DMGCP, LOGL_ERROR, "ConnectionIdentifiers do not match on 0x%x. %x != %s\n", ENDPOINT_NUMBER(endp), endp->ci, _ci); return -1; } diff --git a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c index 44048201f..704168ef1 100644 --- a/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c +++ b/openbsc/src/osmo-bsc_nat/bsc_mgcp_utils.c @@ -822,7 +822,7 @@ 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; } |