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

@@ -569,7 +569,7 @@ static void pres_event_handler(switch_event_t *event)
switch_mprintf("select sub_from, sub_to,'%q','%q','%q','%q' from jabber_subscriptions where sub_to = '%q%q'", type, rpid, status, proto, pstr,
from);
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 = (mdl_profile_t *) val;
@@ -701,7 +701,7 @@ static void roster_event_handler(switch_event_t *event)
sql = switch_mprintf("select *,'%q' from jabber_subscriptions", status ? status : "");
}
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 = (mdl_profile_t *) val;
@@ -738,7 +738,7 @@ static void ipchanged_event_handler(switch_event_t *event)
mdl_profile_t *profile;
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "IP change detected [%s]->[%s]\n", old_ip4, new_ip4);
if (globals.profile_hash) {
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 = (mdl_profile_t *) val;
if (old_ip4 && profile->extip && !strcmp(profile->extip, old_ip4)) {
@@ -799,7 +799,7 @@ static void sign_off(void)
sql = switch_mprintf("select * from jabber_subscriptions");
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 = (mdl_profile_t *) val;
@@ -2684,7 +2684,7 @@ static switch_status_t list_profiles(const char *line, const char *cursor, switc
switch_console_callback_match_t *my_matches = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
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 = (mdl_profile_t *) val;
if (!strncmp("dl_logout", line, 9)) {
@@ -3090,7 +3090,7 @@ SWITCH_STANDARD_API(dingaling)
if (argv[0] && !strncasecmp(argv[0], "status", 6)) {
stream->write_function(stream, "--DingaLing status--\n");
stream->write_function(stream, "login | connected\n");
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 = (mdl_profile_t *) val;
stream->write_function(stream, "%s | ", profile->login);
@@ -3345,7 +3345,7 @@ static switch_status_t soft_reload(void)
switch_xml_free(xml);
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, &data);
profile = (mdl_profile_t *) data;
@@ -3356,7 +3356,7 @@ static switch_status_t soft_reload(void)
}
}
for (hi = switch_core_hash_first( name_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( name_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, NULL, NULL, &data);
if ((profile = switch_core_hash_find(globals.profile_hash, (char *) data))) {
@@ -2491,7 +2491,7 @@ static switch_status_t list_shared_streams(char **argv, int argc, switch_stream_
{
switch_hash_index_t *hi;
int cnt = 0;
for (hi = switch_core_hash_first( globals.sh_streams); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.sh_streams); hi; hi = switch_core_hash_next(&hi)) {
const void *var;
void *val;
shared_audio_stream_t *s = NULL;
@@ -2509,7 +2509,7 @@ static switch_status_t list_endpoints(char **argv, int argc, switch_stream_handl
{
switch_hash_index_t *hi;
int cnt = 0;
for (hi = switch_core_hash_first( globals.endpoints); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( globals.endpoints); hi; hi = switch_core_hash_next(&hi)) {
const void *var;
void *val;
audio_endpoint_t *e = NULL;
+6 -6
View File
@@ -827,7 +827,7 @@ static void rtmp_garbage_colletor(void)
top:
for (hi = switch_core_hash_first( rtmp_globals.session_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( rtmp_globals.session_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
@@ -868,7 +868,7 @@ switch_status_t rtmp_real_session_destroy(rtmp_session_t **rsession)
int sess = 0;
switch_thread_rwlock_rdlock((*rsession)->session_rwlock);
for (hi = switch_core_hash_first( (*rsession)->session_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( (*rsession)->session_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
@@ -1633,7 +1633,7 @@ SWITCH_STANDARD_API(rtmp_function)
stream->write_function(stream, "\nSessions:\n");
stream->write_function(stream, "uuid,address,user,domain,flashVer,state\n");
switch_thread_rwlock_rdlock(profile->session_rwlock);
for (hi = switch_core_hash_first( profile->session_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( profile->session_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
@@ -1655,7 +1655,7 @@ SWITCH_STANDARD_API(rtmp_function)
stream->write_function(stream, "user,nickname,uuid\n");
switch_thread_rwlock_rdlock(profile->reg_rwlock);
for (hi = switch_core_hash_first( profile->reg_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( profile->reg_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
@@ -1681,7 +1681,7 @@ SWITCH_STANDARD_API(rtmp_function)
} else {
switch_hash_index_t *hi;
switch_thread_rwlock_rdlock(rtmp_globals.profile_rwlock);
for (hi = switch_core_hash_first( rtmp_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( rtmp_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
@@ -1805,7 +1805,7 @@ static switch_status_t console_complete_hashtable(switch_hash_t *hash, const cha
switch_console_callback_match_t *my_matches = NULL;
switch_status_t status = SWITCH_STATUS_FALSE;
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, &vvar, NULL, &val);
switch_console_push_match(&my_matches, (const char *) vvar);
}
+1 -1
View File
@@ -243,7 +243,7 @@ switch_status_t rtmp_check_auth(rtmp_session_t *rsession, const char *user, cons
if (disallow_multiple_registration) {
switch_hash_index_t *hi;
switch_thread_rwlock_rdlock(rsession->profile->session_rwlock);
for (hi = switch_core_hash_first( rsession->profile->session_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( rsession->profile->session_hash); hi; hi = switch_core_hash_next(&hi)) {
void *val;
const void *key;
switch_ssize_t keylen;
+5 -5
View File
@@ -197,7 +197,7 @@ skinny_profile_t *skinny_find_profile_by_domain(const char *domain_name)
skinny_profile_t *profile = NULL, *tmp_profile;
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);
tmp_profile = (skinny_profile_t *) val;
@@ -1401,7 +1401,7 @@ static void walk_listeners(skinny_listener_callback_func_t callback, void *pvt)
/* walk listeners */
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 = (skinny_profile_t *) val;
@@ -2441,7 +2441,7 @@ static void skinny_trap_event_handler(switch_event_t *event)
switch_mutex_lock(globals.mutex);
if (globals.profile_hash) {
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, &var, NULL, &val);
if ((profile = (skinny_profile_t *) val) && profile->auto_restart) {
if (!strcmp(profile->ip, old_ip4)) {
@@ -2540,7 +2540,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_skinny_load)
/* launch listeners */
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)) {
void *val;
skinny_profile_t *profile;
@@ -2587,7 +2587,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skinny_shutdown)
/* close sockets */
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)) {
skinny_profile_t *profile;
switch_core_hash_this(hi, NULL, NULL, &val);
profile = (skinny_profile_t *) val;
+1 -1
View File
@@ -49,7 +49,7 @@ static switch_status_t skinny_api_list_profiles(const char *line, const char *cu
/* walk profiles */
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 = (skinny_profile_t *) val;
+10 -10
View File
@@ -2474,7 +2474,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
stream->write_function(stream, "%25s\t%32s\t%s\t%s\t%s\n", "Profile::Gateway-Name", " Data ", "State", "IB Calls(F/T)", "OB Calls(F/T)");
stream->write_function(stream, "%s\n", line);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
@@ -2707,7 +2707,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
stream->write_function(stream, "%25s\t%s\t %40s\t%s\n", "Name", " Type", "Data", "State");
stream->write_function(stream, "%s\n", line);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
@@ -2819,7 +2819,7 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
stream->write_function(stream, "<gateways>\n", header);
switch_mutex_lock(mod_sofia_globals.hash_mutex);
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
@@ -2991,7 +2991,7 @@ static switch_status_t cmd_xml_status(char **argv, int argc, switch_stream_handl
stream->write_function(stream, "%s\n", header);
stream->write_function(stream, "<profiles>\n");
switch_mutex_lock(mod_sofia_globals.hash_mutex);
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
@@ -3654,7 +3654,7 @@ SWITCH_STANDARD_API(sofia_contact_function)
const void *var;
void *val;
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (sofia_profile_t *) val) && !strcmp((char *)var, profile->name)) {
select_from_profile(profile, user, domain, concat, exclude_contact, &mystream, SWITCH_TRUE);
@@ -3839,7 +3839,7 @@ SWITCH_STANDARD_API(sofia_presence_data_function)
const void *var;
void *val;
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (sofia_profile_t *) val) && !strcmp((char *)var, profile->name)) {
get_presence_data(profile, user, domain, search, stream);
@@ -5230,7 +5230,7 @@ static void general_event_handler(switch_event_t *event)
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash && !zstr(old_ip4) && !zstr(new_ip4)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (sofia_profile_t *) val)) {
@@ -5259,7 +5259,7 @@ static void general_event_handler(switch_event_t *event)
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
int rb = 0;
uint32_t x = 0;
switch_core_hash_this(hi, &var, NULL, &val);
@@ -5372,7 +5372,7 @@ switch_status_t list_profiles_full(const char *line, const char *cursor, switch_
switch_status_t status = SWITCH_STATUS_FALSE;
switch_mutex_lock(mod_sofia_globals.hash_mutex);
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
@@ -5410,7 +5410,7 @@ static switch_status_t list_gateways(const char *line, const char *cursor, switc
switch_status_t status = SWITCH_STATUS_FALSE;
switch_mutex_lock(mod_sofia_globals.hash_mutex);
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &vvar, NULL, &val);
profile = (sofia_profile_t *) val;
if (sofia_test_pflag(profile, PFLAG_RUNNING)) {
+1 -1
View File
@@ -7196,7 +7196,7 @@ nua_handle_t *sofia_global_nua_handle_by_replaces(sip_replaces_t *replaces)
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((profile = (sofia_profile_t *) val)) {
if (!(nh = nua_handle_by_replaces(profile->nua, replaces))) {
+6 -6
View File
@@ -1653,7 +1653,7 @@ void sofia_glue_restart_all_profiles(void)
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val)) {
int rsec = 10;
@@ -1688,7 +1688,7 @@ void sofia_glue_global_siptrace(switch_bool_t on)
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val)) {
nua_set_params(pptr->nua, TPTAG_LOG(on), TAG_END());
@@ -1708,7 +1708,7 @@ void sofia_glue_global_standby(switch_bool_t on)
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val)) {
if (on) {
@@ -1732,7 +1732,7 @@ void sofia_glue_global_capture(switch_bool_t on)
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val)) {
nua_set_params(pptr->nua, TPTAG_CAPT(on ? mod_sofia_globals.capture_server : NULL), TAG_END());
@@ -1753,7 +1753,7 @@ void sofia_glue_global_watchdog(switch_bool_t on)
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val)) {
pptr->watchdog_enabled = (on ? 1 : 0);
@@ -1776,7 +1776,7 @@ void sofia_glue_del_profile(sofia_profile_t *profile)
switch_mutex_lock(mod_sofia_globals.hash_mutex);
if (mod_sofia_globals.profile_hash) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.profile_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((pptr = (sofia_profile_t *) val) && pptr == profile) {
aliases[i++] = strdup((char *) var);
+2 -2
View File
@@ -1109,7 +1109,7 @@ void sofia_reg_close_handles(sofia_profile_t *profile)
switch_mutex_lock(profile->flag_mutex);
if (profile->reg_nh_hash) {
top:
for (hi = switch_core_hash_first( profile->reg_nh_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( profile->reg_nh_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if ((nh = (nua_handle_t *) val)) {
nua_handle_unref(nh);
@@ -3155,7 +3155,7 @@ sofia_gateway_t *sofia_reg_find_gateway_by_realm__(const char *file, const char
void *val;
switch_mutex_lock(mod_sofia_globals.hash_mutex);
for (hi = switch_core_hash_first( mod_sofia_globals.gateway_hash); hi; hi = switch_core_hash_next(hi)) {
for (hi = switch_core_hash_first( mod_sofia_globals.gateway_hash); hi; hi = switch_core_hash_next(&hi)) {
switch_core_hash_this(hi, &var, NULL, &val);
if (key && (gateway = (sofia_gateway_t *) val) && !gateway->deleted && gateway->register_realm && !strcasecmp(gateway->register_realm, key)) {
break;