FSCORE-343

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12855 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-03-31 20:30:13 +00:00
parent 7119462aa1
commit 3666e9b858

View File

@ -56,6 +56,7 @@ struct fifo_node {
switch_memory_pool_t *pool; switch_memory_pool_t *pool;
int has_outbound; int has_outbound;
int ready; int ready;
int is_static;
}; };
typedef struct fifo_node fifo_node_t; typedef struct fifo_node fifo_node_t;
@ -1756,7 +1757,7 @@ static switch_status_t load_config(int reload, int del_all)
void *val; void *val;
for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) { for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
switch_hash_this(hi, NULL, NULL, &val); switch_hash_this(hi, NULL, NULL, &val);
if ((node = (fifo_node_t *) val)) { if ((node = (fifo_node_t *) val) && node->is_static) {
node->ready = 0; node->ready = 0;
} }
} }
@ -1845,6 +1846,7 @@ static switch_status_t load_config(int reload, int del_all)
} }
node->ready = 1; node->ready = 1;
node->is_static = 1;
switch_mutex_unlock(node->mutex); switch_mutex_unlock(node->mutex);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s configured\n", node->name); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "%s configured\n", node->name);
@ -1862,11 +1864,10 @@ static switch_status_t load_config(int reload, int del_all)
for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) { for (hi = switch_hash_first(NULL, globals.fifo_hash); hi; hi = switch_hash_next(hi)) {
int x = 0; int x = 0;
switch_hash_this(hi, NULL, NULL, &val); switch_hash_this(hi, NULL, NULL, &val);
if (!(node = (fifo_node_t *) val) || node->ready) { if (!(node = (fifo_node_t *) val) || !node->is_static || node->ready) {
continue; continue;
} }
if (node_consumer_wait_count(node) || node->consumer_count || node_idle_consumers(node)) { if (node_consumer_wait_count(node) || node->consumer_count || node_idle_consumers(node)) {
node->ready = 1; node->ready = 1;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s not removed, still in use.\n", node->name); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "%s not removed, still in use.\n", node->name);