fix FSCORE-188
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9545 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
4ee46554aa
commit
a657bf9186
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
#include <switch.h>
|
#include <switch.h>
|
||||||
#include <switch_event.h>
|
#include <switch_event.h>
|
||||||
#define MAX_DISPATCH 20
|
|
||||||
#define DISPATCH_QUEUE_LEN 5000
|
#define DISPATCH_QUEUE_LEN 5000
|
||||||
//#define DEBUG_DISPATCH_QUEUES
|
//#define DEBUG_DISPATCH_QUEUES
|
||||||
|
|
||||||
|
@ -61,7 +61,9 @@ struct switch_event_subclass {
|
||||||
char *name;
|
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 hostname[128] = "";
|
||||||
static char guess_ip_v4[80] = "";
|
static char guess_ip_v4[80] = "";
|
||||||
static char guess_ip_v6[80] = "";
|
static char guess_ip_v6[80] = "";
|
||||||
|
@ -73,7 +75,7 @@ static switch_memory_pool_t *RUNTIME_POOL = NULL;
|
||||||
static switch_memory_pool_t *THRUNTIME_POOL = NULL;
|
static switch_memory_pool_t *THRUNTIME_POOL = NULL;
|
||||||
#define NUMBER_OF_QUEUES 3
|
#define NUMBER_OF_QUEUES 3
|
||||||
static switch_queue_t *EVENT_QUEUE[NUMBER_OF_QUEUES] = { 0 };
|
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 int POOL_COUNT_MAX = SWITCH_CORE_QUEUE_LEN;
|
||||||
static switch_mutex_t *EVENT_QUEUE_MUTEX = NULL;
|
static switch_mutex_t *EVENT_QUEUE_MUTEX = NULL;
|
||||||
static switch_hash_t *CUSTOM_HASH = NULL;
|
static switch_hash_t *CUSTOM_HASH = NULL;
|
||||||
|
@ -416,7 +418,8 @@ SWITCH_DECLARE(void) switch_core_memory_reclaim_events(void)
|
||||||
|
|
||||||
SWITCH_DECLARE(switch_status_t) switch_event_shutdown(void)
|
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;
|
switch_hash_index_t *hi;
|
||||||
const void *var;
|
const void *var;
|
||||||
void *val;
|
void *val;
|
||||||
|
@ -463,7 +466,7 @@ static void launch_dispatch_threads(int max, int len, switch_memory_pool_t *pool
|
||||||
{
|
{
|
||||||
switch_thread_t *thread;
|
switch_thread_t *thread;
|
||||||
switch_threadattr_t *thd_attr;
|
switch_threadattr_t *thd_attr;
|
||||||
int index = 0;
|
uint32_t index = 0;
|
||||||
|
|
||||||
if (max > MAX_DISPATCH) {
|
if (max > MAX_DISPATCH) {
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue