]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix race on shutdown
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 31 Jan 2008 16:19:09 +0000 (16:19 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 31 Jan 2008 16:19:09 +0000 (16:19 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7444 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_dingaling/mod_dingaling.c

index 8d016cfec783598363f441c6f1eea1557a9a742f..571bbb073a44f4a8a8f077372d24d51024dae71b 100644 (file)
@@ -414,8 +414,11 @@ static void pres_event_handler(switch_event_t *event)
        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 @@ static void roster_event_handler(switch_event_t *event)
        void *val;
        char *sql;
 
+    if (globals.running != 1) {
+        return;
+    }
 
        if (status && !strcasecmp(status, "n/a")) {
                status = NULL;