aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael McTernan <mike.mcternan@wavemobile.com>2015-09-04 15:57:47 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-09-04 16:05:30 +0200
commit79135acbb88c92bbe0214ada4feea53cb12a0ef4 (patch)
treecbbf7eeb802d1b3a0a505287a5aeba803d51a498
parente5ba92e7bedcb3e9981161a33f7dd8ef6d2cf178 (diff)
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.
-rw-r--r--openbsc/src/libmgcp/mgcp_protocol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libmgcp/mgcp_protocol.c b/openbsc/src/libmgcp/mgcp_protocol.c
index 717c1fc0..103897c7 100644
--- a/openbsc/src/libmgcp/mgcp_protocol.c
+++ b/openbsc/src/libmgcp/mgcp_protocol.c
@@ -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];
}