[Freeswitch-svn] [commit] r7444 - freeswitch/trunk/src/mod/endpoints/mod_dingaling

Freeswitch SVN anthm at freeswitch.org
Thu Jan 31 11:19:10 EST 2008


Author: anthm
Date: Thu Jan 31 11:19:09 2008
New Revision: 7444

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c

Log:
fix race on shutdown

Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	Thu Jan 31 11:19:09 2008
@@ -414,8 +414,11 @@
 	char *rpid = switch_event_get_header(event, "rpid");
 	char *type = switch_event_get_header(event, "event_subtype");
 	char *sql;
-
-
+    
+    if (globals.running != 1) {
+        return;
+    }
+    
 	if (!proto) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Missing 'proto' header\n");
 		return;
@@ -557,6 +560,9 @@
 	void *val;
 	char *sql;
 
+    if (globals.running != 1) {
+        return;
+    }
 
 	if (status && !strcasecmp(status, "n/a")) {
 		status = NULL;



More information about the Freeswitch-svn mailing list