[Freeswitch-svn] [commit] r2678 - in freeswitch/trunk/src: . mod/endpoints/mod_sofia

Freeswitch SVN mikej at freeswitch.org
Wed Sep 13 10:31:56 EDT 2006


Author: mikej
Date: Wed Sep 13 10:31:55 2006
New Revision: 2678

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
   freeswitch/trunk/src/switch_rtp.c

Log:
fix rtp destroy race.

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Wed Sep 13 10:31:55 2006
@@ -649,7 +649,6 @@
 			loops++;
 		}
 		switch_rtp_destroy(&tech_pvt->rtp_session);
-		tech_pvt->rtp_session = NULL;
 	}
 }
 

Modified: freeswitch/trunk/src/switch_rtp.c
==============================================================================
--- freeswitch/trunk/src/switch_rtp.c	(original)
+++ freeswitch/trunk/src/switch_rtp.c	Wed Sep 13 10:31:55 2006
@@ -547,6 +547,7 @@
 
 SWITCH_DECLARE(void) switch_rtp_kill_socket(switch_rtp_t *rtp_session)
 {
+	assert(rtp_session != NULL);
 	switch_mutex_lock(rtp_session->flag_mutex);
 	apr_socket_shutdown(rtp_session->sock, APR_SHUTDOWN_READWRITE);
 	switch_clear_flag(rtp_session, SWITCH_RTP_FLAG_IO);



More information about the Freeswitch-svn mailing list