mod_fifo: Refactor in create_node()

This commit is contained in:
Travis Cross 2014-05-26 05:33:02 +00:00
parent 628b6c19ab
commit e677da5870
1 changed files with 1 additions and 6 deletions

View File

@ -995,7 +995,6 @@ static fifo_node_t *create_node(const char *name, uint32_t importance, switch_mu
return NULL;
}
switch_core_new_memory_pool(&pool);
node = switch_core_alloc(pool, sizeof(*node));
@ -1022,11 +1021,7 @@ static fifo_node_t *create_node(const char *name, uint32_t importance, switch_mu
sql = switch_mprintf("select count(*) from fifo_outbound where fifo_name = '%q'", name);
fifo_execute_sql_callback(mutex, sql, sql2str_callback, &cbt);
node->member_count = atoi(outbound_count);
if (node->member_count > 0) {
node->has_outbound = 1;
} else {
node->has_outbound = 0;
}
node->has_outbound = (node->member_count > 0) ? 1 : 0;
switch_safe_free(sql);
node->importance = importance;