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-01 07:56:04 +0200 |
commit | f0fc618782dbcb9cfb915184dbe5f218f5346273 (patch) | |
tree | e9d2136f75f0bf65ec190e07520011f40d6e7cb1 | |
parent | c57575bea80c901823f22983cb49ba03da5b21e5 (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.
-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 b76ca4732..dbf3b5c2b 100644 --- a/openbsc/src/mgcp/mgcp_network.c +++ b/openbsc/src/mgcp/mgcp_network.c @@ -146,7 +146,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 { |