[PATCH] osmo-mgw[master]: mgcp: allow endpoints beginning from zero

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Thu Jan 18 17:32:26 UTC 2018


Review at  https://gerrit.osmocom.org/5876

mgcp: allow endpoints beginning from zero

there is a now obsolete constraint that endpoint numbers must
start at 1.

- remove the check to allow also endpoints starting at 0

Change-Id: Iec2f4e36e1ab01ff23875d99e4b0e04af7c1ad98
---
M src/libosmo-mgcp/mgcp_msg.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/76/5876/1

diff --git a/src/libosmo-mgcp/mgcp_msg.c b/src/libosmo-mgcp/mgcp_msg.c
index 7f05a44..45195de 100644
--- a/src/libosmo-mgcp/mgcp_msg.c
+++ b/src/libosmo-mgcp/mgcp_msg.c
@@ -193,7 +193,7 @@
 		return find_e1_endpoint(cfg, mgcp);
 
 	gw = strtoul(mgcp, &endptr, 16);
-	if (gw > 0 && gw < cfg->trunk.number_endpoints && endptr[0] == '@')
+	if (gw < cfg->trunk.number_endpoints && endptr[0] == '@')
 		return &cfg->trunk.endpoints[gw];
 
 	LOGP(DLMGCP, LOGL_ERROR, "Not able to find the endpoint: '%s'\n", mgcp);

-- 
To view, visit https://gerrit.osmocom.org/5876
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec2f4e36e1ab01ff23875d99e4b0e04af7c1ad98
Gerrit-PatchSet: 1
Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>



More information about the gerrit-log mailing list