[Freeswitch-branches] [commit] r11441 - in freeswitch/branches/1.0/src: . include mod/endpoints/mod_sofia

FreeSWITCH SVN mikej at freeswitch.org
Thu Jan 22 15:54:43 PST 2009


Author: mikej
Date: Thu Jan 22 17:54:43 2009
New Revision: 11441

Log:
mod_sofia: reset media timeout on re-invite (r:11161)

Modified:
   freeswitch/branches/1.0/src/include/switch_rtp.h
   freeswitch/branches/1.0/src/mod/endpoints/mod_sofia/sofia_glue.c
   freeswitch/branches/1.0/src/switch_rtp.c

Modified: freeswitch/branches/1.0/src/include/switch_rtp.h
==============================================================================
--- freeswitch/branches/1.0/src/include/switch_rtp.h	(original)
+++ freeswitch/branches/1.0/src/include/switch_rtp.h	Thu Jan 22 17:54:43 2009
@@ -168,7 +168,7 @@
 
 SWITCH_DECLARE(char *) switch_rtp_get_remote_host(switch_rtp_t *rtp_session);
 SWITCH_DECLARE(switch_port_t) switch_rtp_get_remote_port(switch_rtp_t *rtp_session);
-
+SWITCH_DECLARE(void) switch_rtp_reset_media_timer(switch_rtp_t *rtp_session);
 SWITCH_DECLARE(void) switch_rtp_set_max_missed_packets(switch_rtp_t *rtp_session, uint32_t max);
 
 /*! 

Modified: freeswitch/branches/1.0/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/branches/1.0/src/mod/endpoints/mod_sofia/sofia_glue.c	(original)
+++ freeswitch/branches/1.0/src/mod/endpoints/mod_sofia/sofia_glue.c	Thu Jan 22 17:54:43 2009
@@ -1817,6 +1817,10 @@
 	switch_assert(tech_pvt != NULL);
 	switch_mutex_lock(tech_pvt->sofia_mutex);
 
+	if (switch_rtp_ready(tech_pvt->rtp_session)) {
+		switch_rtp_reset_media_timer(tech_pvt->rtp_session);
+	}
+
 	if ((var = switch_channel_get_variable(tech_pvt->channel, SOFIA_SECURE_MEDIA_VARIABLE)) && switch_true(var)) {
 		switch_set_flag_locked(tech_pvt, TFLAG_SECURE);
 	}

Modified: freeswitch/branches/1.0/src/switch_rtp.c
==============================================================================
--- freeswitch/branches/1.0/src/switch_rtp.c	(original)
+++ freeswitch/branches/1.0/src/switch_rtp.c	Thu Jan 22 17:54:43 2009
@@ -608,6 +608,11 @@
 	rtp_session->max_missed_packets = max;
 }
 
+SWITCH_DECLARE(void) switch_rtp_reset_media_timer(switch_rtp_t *rtp_session)
+{
+	rtp_session->missed_count = 0;
+}
+
 SWITCH_DECLARE(char *) switch_rtp_get_remote_host(switch_rtp_t *rtp_session)
 {
 	return switch_strlen_zero(rtp_session->remote_host_str) ? "0.0.0.0" : rtp_session->remote_host_str;



More information about the Freeswitch-branches mailing list