diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-01 07:56:04 +0200 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-04-05 22:03:04 +0200 |
commit | 8b120f0ef9d533654c4fca98bcaed756c3a1dea2 (patch) | |
tree | d1fd4ef0dd45ec5c4cc02f8bcdac9e63a70ad280 /openbsc/src | |
parent | f2f1591ce7fde28d67da30c1998eaa631c2d5897 (diff) |
[mgcp] Look at the bts addr set at the endpoint
This will allow to discover the ports of a bts when we only know
the addr and have multiple bts's to handle.
Diffstat (limited to 'openbsc/src')
-rw-r--r-- | openbsc/src/mgcp/mgcp_network.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openbsc/src/mgcp/mgcp_network.c b/openbsc/src/mgcp/mgcp_network.c index 924e6fc44..592e20fff 100644 --- a/openbsc/src/mgcp/mgcp_network.c +++ b/openbsc/src/mgcp/mgcp_network.c @@ -144,7 +144,9 @@ static int rtp_data_cb(struct bsc_fd *fd, unsigned int what) /* We have no idea who called us, maybe it is the BTS. */ if (dest == DEST_NETWORK && (endp->bts_rtp == 0 || cfg->forward_ip)) { /* it was the BTS... */ - if (!cfg->bts_ip || memcmp(&addr.sin_addr, &cfg->bts_in, sizeof(cfg->bts_in)) == 0) { + if (!cfg->bts_ip + || memcmp(&addr.sin_addr, &cfg->bts_in, sizeof(cfg->bts_in)) == 0 + || memcmp(&addr.sin_addr, &endp->bts, sizeof(endp->bts)) == 0) { if (fd == &endp->local_rtp) { endp->bts_rtp = addr.sin_port; } else { |