summaryrefslogtreecommitdiffstats
path: root/openbsc/src/mgcp/mgcp_network.c
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-06-17 14:34:17 +0800
commita19bdabf22bf748b917794628a1e49e6c232756a (patch)
treedecf04aa9df4be5bd53f89ae7e5544fef39c5949 /openbsc/src/mgcp/mgcp_network.c
parentb5be7ac39cbe44e47109fd80984815cb8c763c55 (diff)
[mgcp] Only patch RTP packets when they arrived on the RTP port
Do not attempt to patch RTCP packets...
Diffstat (limited to 'openbsc/src/mgcp/mgcp_network.c')
-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 1f51233d3..ceeadb168 100644
--- a/openbsc/src/mgcp/mgcp_network.c
+++ b/openbsc/src/mgcp/mgcp_network.c
@@ -193,12 +193,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);