From: Anthony Minessale Date: Wed, 16 Oct 2013 22:57:23 +0000 (+0500) Subject: only test for reneg after 20 sec with no activity X-Git-Tag: v1.4.1~11^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af4c91764dbb9e7bedb8e43460589c25122d7c59;p=thirdparty%2Ffreeswitch.git only test for reneg after 20 sec with no activity --- diff --git a/src/switch_rtp.c b/src/switch_rtp.c index c3027b8ba3..9078f82486 100644 --- a/src/switch_rtp.c +++ b/src/switch_rtp.c @@ -911,9 +911,6 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d switch_port_t port = 0; char *host = NULL; - ice->missed_count++; - switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING, "missed %d\n", ice->missed_count); - if (elapsed > 20000 && pri) { int i, j; uint32_t old; @@ -924,6 +921,11 @@ static void handle_ice(switch_rtp_t *rtp_session, switch_rtp_ice_t *ice, void *d char adj_port[6]; switch_channel_t *channel = NULL; + + ice->missed_count++; + switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(rtp_session->session), SWITCH_LOG_WARNING, "missed %d\n", ice->missed_count); + + if (rtp_session->session) { channel = switch_core_session_get_channel(rtp_session->session); }