aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-05-22 22:06:13 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-05-22 22:06:13 +0800
commit0777fb2d324d589ef17504c8528f9e3a02e4bc5c (patch)
treea419b2cf554859b5082b6ee2e7a729564f23177a
parent35e56453d2cb11847fe6b65752e1641987419773 (diff)
[mgcp] Only patch RTP packets when they arrived on the RTP port
Do not attempt to patch RTCP packets...
-rw-r--r--openbsc/src/mgcp/mgcp_network.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/mgcp/mgcp_network.c b/openbsc/src/mgcp/mgcp_network.c
index c561d0a1..a93ac44f 100644
--- a/openbsc/src/mgcp/mgcp_network.c
+++ b/openbsc/src/mgcp/mgcp_network.c
@@ -195,12 +195,14 @@ static int rtp_data_cb(struct bsc_fd *fd, unsigned int what)
dest = !dest;
if (dest == DEST_NETWORK) {
- patch_payload(endp->net_payload_type, buf, rc);
+ if (proto == PROTO_RTP)
+ patch_payload(endp->net_payload_type, buf, rc);
return udp_send(fd->fd, &endp->remote,
proto == PROTO_RTP ? endp->net_rtp : endp->net_rtcp,
buf, rc);
} else {
- patch_payload(endp->bts_payload_type, buf, rc);
+ if (proto == PROTO_RTP)
+ patch_payload(endp->bts_payload_type, buf, rc);
return udp_send(fd->fd, &endp->bts,
proto == PROTO_RTP ? endp->bts_rtp : endp->bts_rtcp,
buf, rc);