mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-mgw.git
synced 2025-10-23 08:12:01 +00:00
[mgcp] Only patch RTP packets when they arrived on the RTP port
Do not attempt to patch RTCP packets...
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user