From 8ea4b5688a65e2e3cd8cd2529e40721f435dd18a Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Thu, 19 Nov 2009 16:25:53 +0100 Subject: [PATCH] [mgcp] The nanoBTS is not binding a RTCP port Do not guess the RTCP port as it might be the RTP port of another connection. --- openbsc/src/bsc_mgcp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openbsc/src/bsc_mgcp.c b/openbsc/src/bsc_mgcp.c index d0af8c61e..d4007a0ec 100644 --- a/openbsc/src/bsc_mgcp.c +++ b/openbsc/src/bsc_mgcp.c @@ -256,14 +256,12 @@ static int rtp_data_cb(struct bsc_fd *fd, unsigned int what) if (memcmp(&addr.sin_addr, &bts_in, sizeof(bts_in)) == 0) { if (fd == &endp->local_rtp) { endp->bts_rtp = addr.sin_port; - endp->bts_rtcp = htons(ntohs(addr.sin_port) + 1); } else { - endp->bts_rtp = htons(ntohs(addr.sin_port) - 1); endp->bts_rtcp = addr.sin_port; } - DEBUGP(DMGCP, "Found BTS for endpoint: 0x%x on port: %d\n", - ENDPOINT_NUMBER(endp), ntohs(endp->bts_rtp)); + DEBUGP(DMGCP, "Found BTS for endpoint: 0x%x on port: %d/%d\n", + ENDPOINT_NUMBER(endp), ntohs(endp->bts_rtp), ntohs(endp->bts_rtcp)); } }