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:
parent
5672563f7e
commit
03cc48474c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue