summaryrefslogtreecommitdiffstats
path: root/openbsc/src/mgcp/mgcp_network.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-22 12:14:51 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-25 23:02:27 +0800
commitaa9d3ce97afe7f4d5e690b0557e75b2121afa9e2 (patch)
tree1ab98799b7981b58e7f260502ea7b9d63154617a /openbsc/src/mgcp/mgcp_network.c
parente3d16bb77530f2b3f08fdaf9640dd98bd9e730fa (diff)
[mgcp] Ignore every dummy packet...
This routine should operate on different packets and the dummy load is smaller than a legitimate RTP header so it is unlikely we will filture out genuine traffic. The reason is the dummy load might be send more than once.
Diffstat (limited to 'openbsc/src/mgcp/mgcp_network.c')
-rw-r--r--openbsc/src/mgcp/mgcp_network.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/openbsc/src/mgcp/mgcp_network.c b/openbsc/src/mgcp/mgcp_network.c
index 49d21be10..73356f759 100644
--- a/openbsc/src/mgcp/mgcp_network.c
+++ b/openbsc/src/mgcp/mgcp_network.c
@@ -172,16 +172,16 @@ static int rtp_data_cb(struct bsc_fd *fd, unsigned int what)
ENDPOINT_NUMBER(endp), ntohs(endp->bts_rtp), ntohs(endp->bts_rtcp),
inet_ntoa(addr.sin_addr));
- /* throw away dummy message */
- if (rc == 1 && buf[0] == DUMMY_LOAD) {
- LOGP(DMGCP, LOGL_NOTICE, "Filtered dummy on 0x%x\n",
- ENDPOINT_NUMBER(endp));
- return 0;
- }
-
}
}
+ /* throw away dummy message */
+ if (rc == 1 && buf[0] == DUMMY_LOAD) {
+ LOGP(DMGCP, LOGL_NOTICE, "Filtered dummy on 0x%x\n",
+ ENDPOINT_NUMBER(endp));
+ return 0;
+ }
+
/* do this before the loop handling */
if (dest == DEST_NETWORK)
++endp->in_bts;