From: Brian West Date: Fri, 21 Jan 2011 21:08:26 +0000 (-0600) Subject: Fix ZRTP X-Git-Tag: v1.2-rc1~187^2~13^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e0ed0008b1712d00f21d8fedce32eeb531e5da82;p=thirdparty%2Ffreeswitch.git Fix ZRTP --- diff --git a/src/switch_rtp.c b/src/switch_rtp.c index faf2868f48..4acadfe2ff 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -2726,14 +2726,6 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ } } - if (bytes && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_UDPTL) && - rtp_session->recv_msg.header.pt != 13 && - rtp_session->recv_msg.header.pt != rtp_session->recv_te && - (!rtp_session->cng_pt || rtp_session->recv_msg.header.pt != rtp_session->cng_pt) && - rtp_session->recv_msg.header.pt != rtp_session->payload) { - /* drop frames of incorrect payload number and return CNG frame instead */ - return_cng_frame(); - } if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_ENABLE_RTCP) && rtp_session->rtcp_read_pollfd) { rtcp_poll_status = switch_poll(rtp_session->rtcp_read_pollfd, 1, &rtcp_fdr, 0); @@ -2812,6 +2804,15 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_ goto end; } + if (bytes && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA) && !switch_test_flag(rtp_session, SWITCH_RTP_FLAG_UDPTL) && + rtp_session->recv_msg.header.pt != 13 && + rtp_session->recv_msg.header.pt != rtp_session->recv_te && + (!rtp_session->cng_pt || rtp_session->recv_msg.header.pt != rtp_session->cng_pt) && + rtp_session->recv_msg.header.pt != rtp_session->payload) { + /* drop frames of incorrect payload number and return CNG frame instead */ + return_cng_frame(); + } + if (!bytes && (io_flags & SWITCH_IO_FLAG_NOBLOCK)) { rtp_session->missed_count = 0; ret = 0;