Change in openbsc[master]: libmgcp: Parse CI as hex string in verify_ci()

Harald Welte gerrit-no-reply at lists.osmocom.org
Tue Apr 30 05:55:41 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/13819 )

Change subject: libmgcp: Parse CI as hex string in verify_ci()
......................................................................

libmgcp: Parse CI as hex string in verify_ci()

In verify_ci CI needs to be parsed as hex instead of dec number as well.

Fixes: OS#3951
Change-Id: I687b467756fa30cbc454e3583c86159d9abcc7d9
---
M openbsc/src/libmgcp/mgcp_protocol.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index 689c91f..3ecf6e2 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -509,7 +509,7 @@
 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. %x != %x\n",

-- 
To view, visit https://gerrit.osmocom.org/13819
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I687b467756fa30cbc454e3583c86159d9abcc7d9
Gerrit-Change-Number: 13819
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Willmann <dwillmann at sysmocom.de>
Gerrit-Reviewer: Daniel Willmann <dwillmann at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190430/6d1607ef/attachment.html>


More information about the gerrit-log mailing list