]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
This condition should NEVER be hit, but in case the started thread is unable to locat...
authorWilliam King <william.king@quentustech.com>
Sat, 25 May 2013 13:51:22 +0000 (06:51 -0700)
committerWilliam King <william.king@quentustech.com>
Sat, 25 May 2013 13:51:22 +0000 (06:51 -0700)
src/switch_event.c

index e932a067d57dffa324dbef651ac25ef939629429..203a6d861d88903366f6c3d30a1f292ed233539e 100644 (file)
@@ -26,7 +26,7 @@
  * Anthony Minessale II <anthm@freeswitch.org>
  * Michael Jerris <mike@jerris.com>
  * Paul D. Tinsley <pdt at jackhammer.org>
- *
+ * William King <william.king@quentustech.com>
  *
  * switch_event.c -- Event System
  *
@@ -254,6 +254,10 @@ static void *SWITCH_THREAD_FUNC switch_event_dispatch_thread(switch_thread_t *th
                }
        }
 
+       if ( my_id >= MAX_DISPATCH_VAL ) {
+               return NULL;
+       }
+
        EVENT_DISPATCH_QUEUE_RUNNING[my_id] = 1;
        switch_mutex_unlock(EVENT_QUEUE_MUTEX);