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

Freeswitch SVN anthm at freeswitch.org
Fri Aug 18 16:03:35 EDT 2006


Author: anthm
Date: Fri Aug 18 16:03:34 2006
New Revision: 2329

Modified:
   freeswitch/trunk/src/switch_core.c

Log:
tweaks part 2

Modified: freeswitch/trunk/src/switch_core.c
==============================================================================
--- freeswitch/trunk/src/switch_core.c	(original)
+++ freeswitch/trunk/src/switch_core.c	Fri Aug 18 16:03:34 2006
@@ -291,7 +291,7 @@
 	}
 	switch_mutex_unlock(runtime.session_table_mutex);
 
-	while(runtime.session_count) {
+	while(runtime.session_count > 0) {
 		switch_yield(10000);
 	}
 }
@@ -2492,7 +2492,9 @@
 	pool = NULL;
 
 	switch_mutex_lock(runtime.session_table_mutex);
-	runtime.session_count--;
+	if (runtime.session_count) {
+		runtime.session_count--;
+	}
 	switch_mutex_unlock(runtime.session_table_mutex);
 }
 



More information about the Freeswitch-svn mailing list