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
This commit is contained in:
Michael Jerris 2008-10-09 22:44:48 +00:00
parent c19ea7c3fd
commit 839fd37831
1 changed files with 9 additions and 9 deletions

View File

@ -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) SWITCH_DECLARE(void) switch_rtp_break(switch_rtp_t *rtp_session)
{ {
char o = 42; int o = 42;
switch_size_t len = sizeof(o); switch_size_t len = sizeof(o);
switch_assert(rtp_session != NULL); 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; 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 *tx_host;
const char *old_host; const char *old_host;
char bufa[30], bufb[30]; 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)) { if (bytes && switch_test_flag(rtp_session, SWITCH_RTP_FLAG_PROXY_MEDIA)) {
/* Fast PASS! */ /* Fast PASS! */
*flags |= SFF_PROXY_PACKET; *flags |= SFF_PROXY_PACKET;