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

Freeswitch SVN anthm at freeswitch.org
Fri Oct 31 11:20:19 EDT 2008


Author: anthm
Date: Fri Oct 31 11:20:18 2008
New Revision: 10208

Modified:
   freeswitch/trunk/src/switch_core_session.c

Log:
one more for good measure

Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c	(original)
+++ freeswitch/trunk/src/switch_core_session.c	Fri Oct 31 11:20:18 2008
@@ -57,10 +57,11 @@
 		if ((session = switch_core_hash_find(session_manager.session_table, uuid_str))) {
 			/* Acquire a read lock on the session */
 #ifdef SWITCH_DEBUG_RWLOCKS
-			if (switch_channel_get_state(session->channel) >= CS_HANGUP || 
+			if (switch_channel_get_state(session->channel) >= CS_HANGUP || switch_test_flag(session, SSF_DESTROYED) ||
 				switch_core_session_perform_read_lock(session, file, func, line) != SWITCH_STATUS_SUCCESS) {
 #else
-			if (switch_channel_get_state(session->channel) >= CS_HANGUP || switch_core_session_read_lock(session) != SWITCH_STATUS_SUCCESS) {
+			if (switch_channel_get_state(session->channel) >= CS_HANGUP || switch_test_flag(session, SSF_DESTROYED) ||
+				switch_core_session_read_lock(session) != SWITCH_STATUS_SUCCESS) {
 #endif
 				/* not available, forget it */
 				session = NULL;



More information about the Freeswitch-svn mailing list