mgcp: Remove use of hardwired @mgw from endpoint IDs.

Remove the host portion of the endpoint Id.  This requires less
configuration and we are probably fine to trust that MGCP only
received messages designated for it.
This commit is contained in:
Michael McTernan 2015-09-04 15:57:47 +02:00 committed by Holger Hans Peter Freyther
parent e5ba92e7be
commit 79135acbb8
1 changed files with 1 additions and 1 deletions

View File

@ -431,7 +431,7 @@ static struct mgcp_endpoint *find_endpoint(struct mgcp_config *cfg, const char *
return find_e1_endpoint(cfg, mgcp);
} else {
gw = strtoul(mgcp, &endptr, 16);
if (gw > 0 && gw < cfg->trunk.number_endpoints && strcmp(endptr, "@mgw") == 0)
if (gw > 0 && gw < cfg->trunk.number_endpoints && endptr[0] == '@')
return &cfg->trunk.endpoints[gw];
}