[Freeswitch-svn] [commit] r4323 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Mon Feb 19 10:20:17 EST 2007


Author: anthm
Date: Mon Feb 19 10:20:16 2007
New Revision: 4323

Modified:
   freeswitch/trunk/src/switch_ivr.c

Log:
add rwlocks to bridge

Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c	(original)
+++ freeswitch/trunk/src/switch_ivr.c	Mon Feb 19 10:20:16 2007
@@ -1965,7 +1965,8 @@
 		pre_b = switch_channel_test_flag(chan_a, CF_EARLY_MEDIA);
 		ans_b = switch_channel_test_flag(chan_b, CF_ANSWERED);
 	}
-
+	switch_core_session_read_lock(session_a);
+	switch_core_session_read_lock(session_b);
 
 	switch_channel_set_flag(chan_a, CF_BRIDGED);
 
@@ -2091,6 +2092,9 @@
 	switch_mutex_lock(data->mutex);
 	data->running = 0;
 	switch_mutex_unlock(data->mutex);
+
+	switch_core_session_rwunlock(session_a);
+	switch_core_session_rwunlock(session_b);
 	return NULL;
 }
 



More information about the Freeswitch-svn mailing list