提交 839fd378 authored 作者: Michael Jerris's avatar Michael Jerris

don't autoadjust on break packets sent to ourself

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9917 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 c19ea7c3
......@@ -975,7 +975,7 @@ SWITCH_DECLARE(switch_status_t) switch_rtp_activate_ice(switch_rtp_t *rtp_sessio
SWITCH_DECLARE(void) switch_rtp_break(switch_rtp_t *rtp_session)
{
char o = 42;
int o = 42;
switch_size_t len = sizeof(o);
switch_assert(rtp_session != NULL);
......@@ -1267,7 +1267,14 @@ 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_AUTOADJ) && switch_sockaddr_get_port(rtp_session->from_addr)) {
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_BREAK)) {
switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_BREAK);
do_2833(rtp_session);
bytes = 0;
return_cng_frame();
}
if (bytes > 12 && switch_test_flag(rtp_session, SWITCH_RTP_FLAG_AUTOADJ) && switch_sockaddr_get_port(rtp_session->from_addr)) {
const char *tx_host;
const char *old_host;
char bufa[30], bufb[30];
......@@ -1308,13 +1315,6 @@ static int rtp_common_read(switch_rtp_t *rtp_session, switch_payload_t *payload_
}
}
if (switch_test_flag(rtp_session, SWITCH_RTP_FLAG_BREAK)) {
switch_clear_flag_locked(rtp_session, SWITCH_RTP_FLAG_BREAK);
do_2833(rtp_session);
bytes = 0;
return_cng_frame();
}
if (bytes && switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA)) {
/* Fast PASS! */
*flags |= SFF_PROXY_PACKET;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论