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
This commit is contained in:
Philipp Maier 2018-01-17 16:59:38 +01:00
parent 5672563f7e
commit 03cc48474c
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ static struct mgcp_endpoint *find_endpoint(struct mgcp_config *cfg,
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);