FS-6402 --resolve

This commit is contained in:
Anthony Minessale committed 2014-04-02 01:20:19 +05:00
1 parent 2c7c041f50
commit 5c0cff70b3
50 files changed
+161 -149

No files matched your search

@@ -282,7 +282,7 @@ SWITCH_STANDARD_API(blacklist_api_function)
switch_mutex_lock(globals.lists_mutex);
if (switch_file_open(&fd, filename, SWITCH_FOPEN_WRITE | SWITCH_FOPEN_TRUNCATE | SWITCH_FOPEN_CREATE, SWITCH_FPROT_OS_DEFAULT, globals.pool)
== SWITCH_STATUS_SUCCESS) {
for (hi = switch_core_hash_first( bl->list); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( bl->list); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
switch_file_printf(fd, "%s\n", (char *)var);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "adding %s to the dump file\n", (char *)var);
@@ -3198,7 +3198,7 @@ SWITCH_STANDARD_API(cc_config_api_function)
switch_hash_index_t *hi;
stream->write_function(stream, "%s", "name|strategy|moh_sound|time_base_score|tier_rules_apply|tier_rule_wait_second|tier_rule_wait_multiply_level|tier_rule_no_agent_no_wait|discard_abandoned_after|abandoned_resume_allowed|max_wait_time|max_wait_time_with_no_agent|max_wait_time_with_no_agent_time_reached|record_template\n");
switch_mutex_lock(globals.mutex);
for (hi = switch_core_hash_first( globals.queue_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.queue_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
@@ -3251,7 +3251,7 @@ SWITCH_STANDARD_API(cc_config_api_function)
switch_hash_index_t *hi;
int queue_count = 0;
switch_mutex_lock(globals.mutex);
for (hi = switch_core_hash_first( globals.queue_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.queue_hash); hi; hi = switch_core_hash_next(&hi)) {
queue_count++;
}
switch_mutex_unlock(globals.mutex);
@@ -5291,7 +5291,7 @@ static switch_status_t list_conferences(const char *line, const char *cursor, sw
const void *vvar;
switch_mutex_lock(globals.hash_mutex);
for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &vvar, NULL, &val);
switch_console_push_match(&my_matches, (const char *) vvar);
}
@@ -5783,7 +5783,7 @@ static switch_status_t conf_api_sub_list(conference_obj_t *conference, switch_st
if (conference == NULL) {
switch_mutex_lock(globals.hash_mutex);
for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(&hi)) {
int fcount = 0;
switch_core_hash_this(hi, NULL, NULL, &val);
conference = (conference_obj_t *) val;
@@ -6262,7 +6262,7 @@ static switch_status_t conf_api_sub_xml_list(conference_obj_t *conference, switc
if (conference == NULL) {
switch_mutex_lock(globals.hash_mutex);
for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.conference_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, NULL, NULL, &val);
conference = (conference_obj_t *) val;
+8 -8
View File
@@ -975,7 +975,7 @@ static int node_idle_consumers(fifo_node_t *node)
int total = 0;
switch_mutex_lock(node->mutex);
for (hi = switch_core_hash_first( node->consumer_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( node->consumer_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
session = (switch_core_session_t *) val;
channel = switch_core_session_get_channel(session);
@@ -3802,7 +3802,7 @@ static int xml_hash(switch_xml_t xml, switch_hash_t *hash, char *container, char
x_tmp = switch_xml_add_child_d(xml, container, cc_off++);
switch_assert(x_tmp);
for (hi = switch_core_hash_first( hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( hash); hi; hi = switch_core_hash_next(&hi)) {
int c_off = 0, d_off = 0;
const char *status;
const char *ts;
@@ -3987,7 +3987,7 @@ void dump_hash(switch_hash_t *hash, switch_stream_handle_t *stream)
const void *var;
switch_mutex_lock(globals.mutex);
for (hi = switch_core_hash_first( hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
stream->write_function(stream, " %s\n", (char *)var);
}
@@ -4002,7 +4002,7 @@ void node_dump(switch_stream_handle_t *stream)
fifo_node_t *node;
void *val;
switch_mutex_lock(globals.mutex);
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, NULL, NULL, &val);
if ((node = (fifo_node_t *) val)) {
stream->write_function(stream, "node: %s\n"
@@ -4100,7 +4100,7 @@ SWITCH_STANDARD_API(fifo_api_function)
switch_assert(x_report);
if (argc < 2) {
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
node = (fifo_node_t *) val;
@@ -4137,7 +4137,7 @@ SWITCH_STANDARD_API(fifo_api_function)
}
} else if (!strcasecmp(argv[0], "count")) {
if (argc < 2) {
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
node = (fifo_node_t *) val;
switch_mutex_lock(node->update_mutex);
@@ -4158,7 +4158,7 @@ SWITCH_STANDARD_API(fifo_api_function)
}
} else if (!strcasecmp(argv[0], "has_outbound")) {
if (argc < 2) {
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
node = (fifo_node_t *) val;
switch_mutex_lock(node->update_mutex);
@@ -4359,7 +4359,7 @@ static switch_status_t load_config(int reload, int del_all)
fifo_node_t *node;
void *val;
switch_mutex_lock(globals.mutex);
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.fifo_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, NULL, NULL, &val);
if ((node = (fifo_node_t *) val) && node->is_static && node->ready == 1) {
node->ready = -1;
+5 -5
View File
@@ -623,7 +623,7 @@ SWITCH_STANDARD_API(hash_dump_function)
if (mode & 1) {
switch_thread_rwlock_rdlock(globals.limit_hash_rwlock);
for (hi = switch_core_hash_first( globals.limit_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.limit_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
@@ -639,7 +639,7 @@ SWITCH_STANDARD_API(hash_dump_function)
if (mode & 2) {
switch_thread_rwlock_rdlock(globals.db_hash_rwlock);
for (hi = switch_core_hash_first( globals.db_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.db_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val = NULL;
const void *key;
switch_ssize_t keylen;
@@ -679,7 +679,7 @@ SWITCH_STANDARD_API(hash_remote_function)
stream->write_function(stream, "Remote connections:\nName\t\t\tState\n");
switch_thread_rwlock_rdlock(globals.remote_hash_rwlock);
for (hi = switch_core_hash_first( globals.remote_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.remote_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
@@ -780,7 +780,7 @@ void limit_remote_destroy(limit_remote_t **r)
switch_thread_rwlock_wrlock((*r)->rwlock);
/* Free hashtable data */
for (hi = switch_core_hash_first( (*r)->index); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( (*r)->index); hi; hi = switch_core_hash_next(&hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
@@ -803,7 +803,7 @@ static limit_hash_item_t get_remote_usage(const char *key) {
switch_hash_index_t *hi;
switch_thread_rwlock_rdlock(globals.remote_hash_rwlock);
for (hi = switch_core_hash_first( globals.remote_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.remote_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val;
const void *hashkey;
switch_ssize_t keylen;
+1 -1
View File
@@ -3088,7 +3088,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_httapi_shutdown)
void *val;
const void *vvar;
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (client_profile_t *) val;
switch_event_destroy(&profile->dial_params.app_list);
+1 -1
View File
@@ -2052,7 +2052,7 @@ SWITCH_STANDARD_API(dialplan_lcr_admin_function)
}
switch_assert(argv[0]);
if (!strcasecmp(argv[0], "show") && !strcasecmp(argv[1], "profiles")) {
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, NULL, NULL, &val);
profile = (profile_t *) val;
+1 -1
View File
@@ -139,7 +139,7 @@ SWITCH_STANDARD_API(dump_hash)
switch_thread_rwlock_rdlock(globals.spy_hash_lock);
for (hi = switch_core_hash_first( globals.spy_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.spy_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &key, NULL, &val);
spy = (spy_t *) val;
@@ -120,7 +120,7 @@ static void check_timeouts(void)
}
globals.last_timeout_check = now;
for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
switch_console_push_match(&matches, (const char *) var);
}
@@ -135,7 +135,7 @@ static void check_timeouts(void)
top:
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(&i_hi)) {
switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
i_ext = (char *) i_var;
token = (valet_token_t *) i_val;
@@ -167,7 +167,7 @@ static int find_longest(valet_lot_t *lot, int min, int max)
time_t now = switch_epoch_time_now(NULL);
switch_mutex_lock(lot->mutex);
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(&i_hi)) {
int i;
switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
token = (valet_token_t *) i_val;
@@ -257,7 +257,7 @@ static int valet_lot_count(valet_lot_t *lot)
now = switch_epoch_time_now(NULL);
switch_mutex_lock(lot->mutex);
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(&i_hi)) {
switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
token = (valet_token_t *) i_val;
if (token->timeout > 0 && (token->timeout < now || token->timeout == 1)) {
@@ -738,7 +738,7 @@ SWITCH_STANDARD_API(valet_info_function)
stream->write_function(stream, "<lots>\n");
switch_mutex_lock(globals.mutex);
for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(&hi)) {
switch_hash_index_t *i_hi;
const void *i_var;
void *i_val;
@@ -754,7 +754,7 @@ SWITCH_STANDARD_API(valet_info_function)
stream->write_function(stream, " <lot name=\"%s\">\n", name);
switch_mutex_lock(lot->mutex);
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(i_hi)) {
for (i_hi = switch_core_hash_first( lot->hash); i_hi; i_hi = switch_core_hash_next(&i_hi)) {
valet_token_t *token;
switch_core_hash_this(i_hi, &i_var, NULL, &i_val);
@@ -848,7 +848,7 @@ static void pres_event_handler(switch_event_t *event)
const char *nvar;
switch_mutex_lock(globals.mutex);
for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
nvar = (const char *) var;
@@ -4020,7 +4020,7 @@ static void actual_message_query_handler(switch_event_t *event)
"Cound not find a profile for domain: [%s] Returning 0 messages\nWhen message-query-exact-match is enabled you must have a dedicated vm profile per distinct domain name you wish to use.\n", domain);
}
} else {
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, NULL, NULL, &val);
profile = (vm_profile_t *) val;
parse_profile();
@@ -4923,7 +4923,7 @@ SWITCH_STANDARD_API(voicemail_api_function)
} else if (!strcasecmp(argv[0], "status")) {
stream->write_function(stream, "============================\n");
switch_mutex_lock(globals.mutex);
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, NULL, NULL, &val);
profile = (vm_profile_t *) val;
stream->write_function(stream, "Profile: %s\n", profile->name);
@@ -4958,7 +4958,7 @@ SWITCH_STANDARD_API(voicemail_api_function)
void *value;
switch_mutex_lock(globals.mutex);
for (index = switch_core_hash_first( globals.profile_hash); index; index = switch_core_hash_next(index)) {
for (index = switch_core_hash_first( globals.profile_hash); index; index = switch_core_hash_next(&index)) {
switch_core_hash_this(index, NULL, NULL, &value);
profile = (vm_profile_t *) value;
if (profile) {