[Freeswitch-svn] [commit] r9545 - freeswitch/trunk/src
Freeswitch SVN
anthm at freeswitch.org
Fri Sep 12 14:04:58 EDT 2008
Author: anthm
Date: Fri Sep 12 14:04:58 2008
New Revision: 9545
Modified:
freeswitch/trunk/src/switch_event.c
Log:
fix FSCORE-188
Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c (original)
+++ freeswitch/trunk/src/switch_event.c Fri Sep 12 14:04:58 2008
@@ -34,7 +34,7 @@
#include <switch.h>
#include <switch_event.h>
-#define MAX_DISPATCH 20
+
#define DISPATCH_QUEUE_LEN 5000
//#define DEBUG_DISPATCH_QUEUES
@@ -61,7 +61,9 @@
char *name;
};
-static int SOFT_MAX_DISPATCH = 0;
+#define MAX_DISPATCH_VAL 20
+static unsigned int MAX_DISPATCH = MAX_DISPATCH_VAL;
+static unsigned int SOFT_MAX_DISPATCH = 0;
static char hostname[128] = "";
static char guess_ip_v4[80] = "";
static char guess_ip_v6[80] = "";
@@ -73,7 +75,7 @@
static switch_memory_pool_t *THRUNTIME_POOL = NULL;
#define NUMBER_OF_QUEUES 3
static switch_queue_t *EVENT_QUEUE[NUMBER_OF_QUEUES] = { 0 };
-static switch_queue_t *EVENT_DISPATCH_QUEUE[MAX_DISPATCH] = { 0 };
+static switch_queue_t *EVENT_DISPATCH_QUEUE[MAX_DISPATCH_VAL] = { 0 };
static int POOL_COUNT_MAX = SWITCH_CORE_QUEUE_LEN;
static switch_mutex_t *EVENT_QUEUE_MUTEX = NULL;
static switch_hash_t *CUSTOM_HASH = NULL;
@@ -416,7 +418,8 @@
SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void)
{
- int x = 0, last = 0;
+ uint32_t x = 0;
+ int last = 0;
switch_hash_index_t *hi;
const void *var;
void *val;
@@ -463,7 +466,7 @@
{
switch_thread_t *thread;
switch_threadattr_t *thd_attr;
- int index = 0;
+ uint32_t index = 0;
if (max > MAX_DISPATCH) {
return;
More information about the Freeswitch-svn
mailing list