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

Freeswitch SVN anthm at freeswitch.org
Mon Aug 11 14:24:08 EDT 2008


Author: anthm
Date: Mon Aug 11 14:24:07 2008
New Revision: 9241

Modified:
   freeswitch/trunk/src/switch_time.c

Log:
move init sooner in timer module

Modified: freeswitch/trunk/src/switch_time.c
==============================================================================
--- freeswitch/trunk/src/switch_time.c	(original)
+++ freeswitch/trunk/src/switch_time.c	Mon Aug 11 14:24:07 2008
@@ -309,9 +309,6 @@
 
 	switch_time_sync();
 
-	memset(&globals, 0, sizeof(globals));
-	switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, module_pool);
-
 	globals.STARTED = globals.RUNNING = 1;
 	switch_mutex_lock(runtime.throttle_mutex);
 	runtime.sps = runtime.sps_total;
@@ -430,6 +427,9 @@
 	switch_timer_interface_t *timer_interface;
 	module_pool = pool;
 
+	memset(&globals, 0, sizeof(globals));
+	switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, module_pool);
+
 	/* connect my internal structure to the blank pointer passed to me */
 	*module_interface = switch_loadable_module_create_module_interface(pool, modname);
 	timer_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_TIMER_INTERFACE);



More information about the Freeswitch-svn mailing list