mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-16 08:14:13 +00:00
change from sqlite hash to newly added one
This commit is contained in:
1 parent
32cce8027e
commit
804ef7709d
83 files changed
+1868
-835
No files matched your search
@@ -829,7 +829,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_alsa_load)
|
||||
|
||||
|
||||
|
||||
switch_core_hash_init(&globals.call_hash, module_pool);
|
||||
switch_core_hash_init(&globals.call_hash);
|
||||
switch_mutex_init(&globals.device_lock, SWITCH_MUTEX_NESTED, module_pool);
|
||||
switch_mutex_init(&globals.pvt_lock, SWITCH_MUTEX_NESTED, module_pool);
|
||||
switch_mutex_init(&globals.flag_mutex, SWITCH_MUTEX_NESTED, module_pool);
|
||||
|
||||
@@ -569,8 +569,8 @@ 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_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
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 (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
|
||||
@@ -701,8 +701,8 @@ static void roster_event_handler(switch_event_t *event)
|
||||
sql = switch_mprintf("select *,'%q' from jabber_subscriptions", status ? status : "");
|
||||
}
|
||||
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
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 (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
|
||||
@@ -738,8 +738,8 @@ 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_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
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)) {
|
||||
tmp = profile->extip;
|
||||
@@ -799,8 +799,8 @@ static void sign_off(void)
|
||||
sql = switch_mprintf("select * from jabber_subscriptions");
|
||||
|
||||
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
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 (!(profile->user_flags & LDL_FLAG_COMPONENT)) {
|
||||
@@ -2684,8 +2684,8 @@ 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_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &vvar, NULL, &val);
|
||||
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)) {
|
||||
if (profile->handle) {
|
||||
@@ -3090,8 +3090,8 @@ 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_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
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);
|
||||
if (profile->handle && ldl_handle_authorized(profile->handle)) {
|
||||
@@ -3276,7 +3276,7 @@ static switch_status_t soft_reload(void)
|
||||
void *data = NULL;
|
||||
switch_hash_t *name_hash;
|
||||
switch_hash_index_t *hi;
|
||||
switch_core_hash_init(&name_hash, module_pool);
|
||||
switch_core_hash_init(&name_hash);
|
||||
|
||||
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
|
||||
@@ -3345,8 +3345,8 @@ static switch_status_t soft_reload(void)
|
||||
|
||||
switch_xml_free(xml);
|
||||
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &data);
|
||||
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;
|
||||
|
||||
if (switch_core_hash_find(name_hash, profile->name)) {
|
||||
@@ -3356,8 +3356,8 @@ static switch_status_t soft_reload(void)
|
||||
}
|
||||
}
|
||||
|
||||
for (hi = switch_hash_first(NULL, name_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &data);
|
||||
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))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Deleting unused profile %s [%s]\n", profile->name, profile->login);
|
||||
@@ -3382,7 +3382,7 @@ static switch_status_t load_config(void)
|
||||
|
||||
switch_find_local_ip(globals.guess_ip, sizeof(globals.guess_ip), NULL, AF_INET);
|
||||
|
||||
switch_core_hash_init(&globals.profile_hash, module_pool);
|
||||
switch_core_hash_init(&globals.profile_hash);
|
||||
|
||||
if (!(xml = switch_xml_open_cfg(cf, &cfg, NULL))) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Open of %s failed\n", cf);
|
||||
|
||||
@@ -1308,9 +1308,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_portaudio_load)
|
||||
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
|
||||
switch_core_hash_init(&globals.call_hash, module_pool);
|
||||
switch_core_hash_init(&globals.sh_streams, module_pool);
|
||||
switch_core_hash_init(&globals.endpoints, module_pool);
|
||||
switch_core_hash_init(&globals.call_hash);
|
||||
switch_core_hash_init(&globals.sh_streams);
|
||||
switch_core_hash_init(&globals.endpoints);
|
||||
switch_mutex_init(&globals.device_lock, SWITCH_MUTEX_NESTED, module_pool);
|
||||
switch_mutex_init(&globals.pvt_lock, SWITCH_MUTEX_NESTED, module_pool);
|
||||
switch_mutex_init(&globals.streams_lock, SWITCH_MUTEX_NESTED, module_pool);
|
||||
@@ -2491,11 +2491,11 @@ static switch_status_t list_shared_streams(char **argv, int argc, switch_stream_
|
||||
{
|
||||
switch_hash_index_t *hi;
|
||||
int cnt = 0;
|
||||
for (hi = switch_hash_first(NULL, globals.sh_streams); hi; hi = switch_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;
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
s = val;
|
||||
stream->write_function(stream, "%s> indev: %d, outdev: %d, sample-rate: %d, codec-ms: %d, channels: %d\n",
|
||||
s->name, s->indev, s->outdev, s->sample_rate, s->codec_ms, s->channels);
|
||||
@@ -2509,11 +2509,11 @@ static switch_status_t list_endpoints(char **argv, int argc, switch_stream_handl
|
||||
{
|
||||
switch_hash_index_t *hi;
|
||||
int cnt = 0;
|
||||
for (hi = switch_hash_first(NULL, globals.endpoints); hi; hi = switch_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;
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
e = val;
|
||||
stream->write_function(stream, "%s> instream: %s, outstream: %s\n",
|
||||
e->name, e->in_stream ? e->in_stream->name : "(none)",
|
||||
|
||||
@@ -788,7 +788,7 @@ switch_status_t rtmp_session_request(rtmp_profile_t *profile, rtmp_session_t **n
|
||||
switch_core_hash_insert_wrlock(rtmp_globals.session_hash, (*newsession)->uuid, *newsession, rtmp_globals.session_rwlock);
|
||||
switch_core_hash_insert_wrlock(profile->session_hash, (*newsession)->uuid, *newsession, profile->session_rwlock);
|
||||
|
||||
switch_core_hash_init(&(*newsession)->session_hash, pool);
|
||||
switch_core_hash_init(&(*newsession)->session_hash);
|
||||
switch_thread_rwlock_create(&(*newsession)->session_rwlock, pool);
|
||||
|
||||
#ifdef RTMP_DEBUG_IO
|
||||
@@ -827,13 +827,13 @@ static void rtmp_garbage_colletor(void)
|
||||
|
||||
top:
|
||||
|
||||
for (hi = switch_hash_first(NULL, rtmp_globals.session_hash); hi; hi = switch_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;
|
||||
rtmp_session_t *rsession;
|
||||
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
rsession = (rtmp_session_t *) val;
|
||||
|
||||
if (rsession->state == RS_DESTROY) {
|
||||
@@ -868,14 +868,14 @@ switch_status_t rtmp_real_session_destroy(rtmp_session_t **rsession)
|
||||
int sess = 0;
|
||||
|
||||
switch_thread_rwlock_rdlock((*rsession)->session_rwlock);
|
||||
for (hi = switch_hash_first(NULL, (*rsession)->session_hash); hi; hi = switch_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;
|
||||
switch_channel_t *channel;
|
||||
switch_core_session_t *session;
|
||||
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
/* If there are any sessions attached, abort the destroy operation */
|
||||
if ((session = switch_core_session_locate((char *)key)) != NULL ) {
|
||||
@@ -1050,10 +1050,10 @@ switch_status_t rtmp_profile_start(const char *profilename)
|
||||
|
||||
switch_thread_rwlock_create(&profile->rwlock, pool);
|
||||
switch_mutex_init(&profile->mutex, SWITCH_MUTEX_NESTED, pool);
|
||||
switch_core_hash_init(&profile->session_hash, pool);
|
||||
switch_core_hash_init(&profile->session_hash);
|
||||
switch_thread_rwlock_create(&profile->session_rwlock, pool);
|
||||
switch_thread_rwlock_create(&profile->reg_rwlock, pool);
|
||||
switch_core_hash_init(&profile->reg_hash, pool);
|
||||
switch_core_hash_init(&profile->reg_hash);
|
||||
|
||||
if (!strcmp(profile->io_name, "tcp")) {
|
||||
if (rtmp_tcp_init(profile, profile->bind_address, &profile->io, pool) != SWITCH_STATUS_SUCCESS) {
|
||||
@@ -1086,12 +1086,12 @@ switch_status_t rtmp_profile_destroy(rtmp_profile_t **profile) {
|
||||
switch_thread_rwlock_wrlock((*profile)->rwlock);
|
||||
|
||||
/* Kill all sessions */
|
||||
while ((hi = switch_hash_first(NULL, (*profile)->session_hash))) {
|
||||
while ((hi = switch_core_hash_first( (*profile)->session_hash))) {
|
||||
void *val;
|
||||
rtmp_session_t *session;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
session = val;
|
||||
|
||||
@@ -1633,12 +1633,12 @@ 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_hash_first(NULL, profile->session_hash); hi; hi = switch_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;
|
||||
rtmp_session_t *item;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
item = (rtmp_session_t *)val;
|
||||
stream->write_function(stream, "%s,%s:%d,%s,%s,%s,%s\n",
|
||||
@@ -1655,12 +1655,12 @@ SWITCH_STANDARD_API(rtmp_function)
|
||||
stream->write_function(stream, "user,nickname,uuid\n");
|
||||
|
||||
switch_thread_rwlock_rdlock(profile->reg_rwlock);
|
||||
for (hi = switch_hash_first(NULL, profile->reg_hash); hi; hi = switch_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;
|
||||
rtmp_reg_t *item;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
item = (rtmp_reg_t *)val;
|
||||
for (;item;item = item->next) {
|
||||
@@ -1681,12 +1681,12 @@ SWITCH_STANDARD_API(rtmp_function)
|
||||
} else {
|
||||
switch_hash_index_t *hi;
|
||||
switch_thread_rwlock_rdlock(rtmp_globals.profile_rwlock);
|
||||
for (hi = switch_hash_first(NULL, rtmp_globals.profile_hash); hi; hi = switch_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;
|
||||
rtmp_profile_t *item;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
item = (rtmp_profile_t *)val;
|
||||
stream->write_function(stream, "%s\t%s:%s\tprofile\n", item->name, item->io->name, item->io->address);
|
||||
@@ -1805,8 +1805,8 @@ 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_hash_first(NULL, hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &vvar, NULL, &val);
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -1845,9 +1845,9 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_rtmp_load)
|
||||
memset(&rtmp_globals, 0, sizeof(rtmp_globals));
|
||||
|
||||
switch_mutex_init(&rtmp_globals.mutex, SWITCH_MUTEX_NESTED, pool);
|
||||
switch_core_hash_init(&rtmp_globals.profile_hash, pool);
|
||||
switch_core_hash_init(&rtmp_globals.session_hash, pool);
|
||||
switch_core_hash_init(&rtmp_globals.invoke_hash, pool);
|
||||
switch_core_hash_init(&rtmp_globals.profile_hash);
|
||||
switch_core_hash_init(&rtmp_globals.session_hash);
|
||||
switch_core_hash_init(&rtmp_globals.invoke_hash);
|
||||
switch_thread_rwlock_create(&rtmp_globals.profile_rwlock, pool);
|
||||
switch_thread_rwlock_create(&rtmp_globals.session_rwlock, pool);
|
||||
|
||||
@@ -1933,12 +1933,12 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_rtmp_shutdown)
|
||||
switch_hash_index_t *hi;
|
||||
|
||||
switch_mutex_lock(rtmp_globals.mutex);
|
||||
while ((hi = switch_hash_first(NULL, rtmp_globals.profile_hash))) {
|
||||
while ((hi = switch_core_hash_first( rtmp_globals.profile_hash))) {
|
||||
void *val;
|
||||
const void *key;
|
||||
switch_ssize_t keylen;
|
||||
rtmp_profile_t *item;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
item = (rtmp_profile_t *)val;
|
||||
|
||||
|
||||
@@ -243,12 +243,12 @@ 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_hash_first(NULL, rsession->profile->session_hash); hi; hi = switch_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;
|
||||
rtmp_session_t *item;
|
||||
switch_hash_this(hi, &key, &keylen, &val);
|
||||
switch_core_hash_this(hi, &key, &keylen, &val);
|
||||
|
||||
item = (rtmp_session_t *)val;
|
||||
if (rtmp_session_check_user(item, user, domain) == SWITCH_STATUS_SUCCESS) {
|
||||
|
||||
@@ -197,8 +197,8 @@ 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_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
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;
|
||||
|
||||
switch_mutex_lock(tmp_profile->listener_mutex);
|
||||
@@ -1401,8 +1401,8 @@ static void walk_listeners(skinny_listener_callback_func_t callback, void *pvt)
|
||||
|
||||
/* walk listeners */
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
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;
|
||||
|
||||
profile_walk_listeners(profile, callback, pvt);
|
||||
@@ -2086,7 +2086,7 @@ static switch_status_t load_skinny_config(void)
|
||||
}
|
||||
|
||||
/* Soft Key Set Sets */
|
||||
switch_core_hash_init(&profile->soft_key_set_sets_hash, profile->pool);
|
||||
switch_core_hash_init(&profile->soft_key_set_sets_hash);
|
||||
if ((xsoft_key_set_sets = switch_xml_child(xprofile, "soft-key-set-sets"))) {
|
||||
switch_xml_t xsoft_key_set_set;
|
||||
for (xsoft_key_set_set = switch_xml_child(xsoft_key_set_sets, "soft-key-set-set"); xsoft_key_set_set; xsoft_key_set_set = xsoft_key_set_set->next) {
|
||||
@@ -2154,7 +2154,7 @@ static switch_status_t load_skinny_config(void)
|
||||
|
||||
|
||||
/* Device types */
|
||||
switch_core_hash_init(&profile->device_type_params_hash, profile->pool);
|
||||
switch_core_hash_init(&profile->device_type_params_hash);
|
||||
if ((xdevice_types = switch_xml_child(xprofile, "device-types"))) {
|
||||
switch_xml_t xdevice_type;
|
||||
for (xdevice_type = switch_xml_child(xdevice_types, "device-type"); xdevice_type; xdevice_type = xdevice_type->next) {
|
||||
@@ -2441,8 +2441,8 @@ static void skinny_trap_event_handler(switch_event_t *event)
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
if (globals.profile_hash) {
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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)) {
|
||||
skinny_profile_set(profile, "ip", new_ip4);
|
||||
@@ -2470,14 +2470,14 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_skinny_load)
|
||||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, globals.pool);
|
||||
switch_core_hash_init(&globals.profile_hash, globals.pool);
|
||||
switch_core_hash_init(&globals.profile_hash);
|
||||
globals.running = 1;
|
||||
globals.auto_restart = SWITCH_TRUE;
|
||||
|
||||
load_skinny_config();
|
||||
|
||||
/* at least one profile */
|
||||
if (!switch_hash_first(NULL, globals.profile_hash)) {
|
||||
if (!switch_core_hash_first( globals.profile_hash)) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No profile found!\n");
|
||||
return SWITCH_STATUS_TERM;
|
||||
}
|
||||
@@ -2540,11 +2540,11 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_skinny_load)
|
||||
|
||||
/* launch listeners */
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_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;
|
||||
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (skinny_profile_t *) val;
|
||||
|
||||
launch_skinny_profile_thread(profile);
|
||||
@@ -2587,9 +2587,9 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_skinny_shutdown)
|
||||
|
||||
/* close sockets */
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.profile_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
skinny_profile_t *profile;
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (skinny_profile_t *) val;
|
||||
|
||||
close_socket(&profile->sock, profile);
|
||||
|
||||
@@ -49,8 +49,8 @@ static switch_status_t skinny_api_list_profiles(const char *line, const char *cu
|
||||
|
||||
/* walk profiles */
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_hash_first(NULL, globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, NULL, NULL, &val);
|
||||
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;
|
||||
|
||||
switch_console_push_match(&my_matches, profile->name);
|
||||
|
||||
@@ -2375,8 +2375,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &vvar, NULL, &val);
|
||||
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)) {
|
||||
|
||||
@@ -2608,8 +2608,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &vvar, NULL, &val);
|
||||
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)) {
|
||||
|
||||
@@ -2720,8 +2720,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &vvar, NULL, &val);
|
||||
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)) {
|
||||
|
||||
@@ -2892,8 +2892,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &vvar, NULL, &val);
|
||||
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)) {
|
||||
|
||||
@@ -3555,8 +3555,8 @@ SWITCH_STANDARD_API(sofia_contact_function)
|
||||
const void *var;
|
||||
void *val;
|
||||
|
||||
for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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);
|
||||
profile = NULL;
|
||||
@@ -3740,8 +3740,8 @@ SWITCH_STANDARD_API(sofia_presence_data_function)
|
||||
const void *var;
|
||||
void *val;
|
||||
|
||||
for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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);
|
||||
profile = NULL;
|
||||
@@ -5137,8 +5137,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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 (!zstr(profile->extsipip) && !strcmp(profile->extsipip, old_ip4)) {
|
||||
@@ -5166,10 +5166,10 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_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_hash_this(hi, &var, NULL, &val);
|
||||
switch_core_hash_this(hi, &var, NULL, &val);
|
||||
if ((profile = (sofia_profile_t *) val) && profile->auto_restart) {
|
||||
if (!strcmp(profile->sipip, old_ip4)) {
|
||||
profile->sipip = switch_core_strdup(profile->pool, new_ip4);
|
||||
@@ -5279,8 +5279,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &vvar, NULL, &val);
|
||||
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 (!show_aliases && strcmp((char *)vvar, profile->name)) {
|
||||
@@ -5317,8 +5317,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &vvar, NULL, &val);
|
||||
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)) {
|
||||
sofia_gateway_t *gp;
|
||||
@@ -5444,8 +5444,8 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_sofia_load)
|
||||
strcpy(mod_sofia_globals.hostname, switch_core_get_switchname());
|
||||
|
||||
|
||||
switch_core_hash_init(&mod_sofia_globals.profile_hash, mod_sofia_globals.pool);
|
||||
switch_core_hash_init(&mod_sofia_globals.gateway_hash, mod_sofia_globals.pool);
|
||||
switch_core_hash_init(&mod_sofia_globals.profile_hash);
|
||||
switch_core_hash_init(&mod_sofia_globals.gateway_hash);
|
||||
switch_mutex_init(&mod_sofia_globals.hash_mutex, SWITCH_MUTEX_NESTED, mod_sofia_globals.pool);
|
||||
|
||||
switch_mutex_lock(mod_sofia_globals.mutex);
|
||||
|
||||
@@ -3950,9 +3950,9 @@ switch_status_t config_sofia(sofia_config_t reload, char *profile_name)
|
||||
}
|
||||
|
||||
profile->dbname = switch_core_strdup(profile->pool, url);
|
||||
switch_core_hash_init(&profile->chat_hash, profile->pool);
|
||||
switch_core_hash_init(&profile->reg_nh_hash, profile->pool);
|
||||
switch_core_hash_init(&profile->mwi_debounce_hash, profile->pool);
|
||||
switch_core_hash_init(&profile->chat_hash);
|
||||
switch_core_hash_init(&profile->reg_nh_hash);
|
||||
switch_core_hash_init(&profile->mwi_debounce_hash);
|
||||
switch_thread_rwlock_create(&profile->rwlock, profile->pool);
|
||||
switch_mutex_init(&profile->flag_mutex, SWITCH_MUTEX_NESTED, profile->pool);
|
||||
profile->dtmf_duration = 100;
|
||||
@@ -7149,8 +7149,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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))) {
|
||||
nh = nua_handle_by_call_id(profile->nua, replaces->rp_call_id);
|
||||
|
||||
@@ -1653,8 +1653,8 @@ void sofia_glue_restart_all_profiles(void)
|
||||
|
||||
switch_mutex_lock(mod_sofia_globals.hash_mutex);
|
||||
if (mod_sofia_globals.profile_hash) {
|
||||
for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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;
|
||||
int diff = (int) (switch_epoch_time_now(NULL) - pptr->started);
|
||||
@@ -1688,8 +1688,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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,8 +1708,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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) {
|
||||
sofia_set_pflag_locked(pptr, PFLAG_STANDBY);
|
||||
@@ -1732,8 +1732,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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,8 +1753,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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,8 +1776,8 @@ 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_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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);
|
||||
if (i == 512) {
|
||||
|
||||
@@ -912,7 +912,7 @@ static void do_dialog_probe(switch_event_t *event)
|
||||
h4235 = switch_core_alloc(pool, sizeof(*h4235));
|
||||
h4235->pool = pool;
|
||||
h4235->profile = profile;
|
||||
switch_core_hash_init(&h4235->hash, h4235->pool);
|
||||
switch_core_hash_init(&h4235->hash);
|
||||
sofia_glue_execute_sql_callback(profile, profile->dbh_mutex, sql, sofia_dialog_probe_callback, h4235);
|
||||
switch_safe_free(sql);
|
||||
if (mod_sofia_globals.debug_presence > 0) {
|
||||
@@ -3499,7 +3499,7 @@ static int sync_sla(sofia_profile_t *profile, const char *to_user, const char *t
|
||||
switch_core_new_memory_pool(&pool);
|
||||
sh = switch_core_alloc(pool, sizeof(*sh));
|
||||
sh->pool = pool;
|
||||
switch_core_hash_init(&sh->hash, sh->pool);
|
||||
switch_core_hash_init(&sh->hash);
|
||||
|
||||
sql = switch_mprintf("select sip_from_user,sip_from_host,call_info,call_info_state,uuid from sip_dialogs "
|
||||
"where call_info_state is not null and call_info_state != '' and call_info_state != 'idle' and hostname='%q' and profile_name='%q' "
|
||||
|
||||
@@ -1099,8 +1099,8 @@ void sofia_reg_close_handles(sofia_profile_t *profile)
|
||||
switch_mutex_lock(profile->flag_mutex);
|
||||
if (profile->reg_nh_hash) {
|
||||
top:
|
||||
for (hi = switch_hash_first(NULL, profile->reg_nh_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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);
|
||||
nua_handle_destroy(nh);
|
||||
@@ -3132,8 +3132,8 @@ 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_hash_first(NULL, mod_sofia_globals.gateway_hash); hi; hi = switch_hash_next(hi)) {
|
||||
switch_hash_this(hi, &var, NULL, &val);
|
||||
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;
|
||||
} else {
|
||||
|
||||
@@ -1864,7 +1864,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_unicall_load)
|
||||
module_pool = pool;
|
||||
|
||||
memset(&globals, 0, sizeof(globals));
|
||||
switch_core_hash_init(&globals.call_hash, module_pool);
|
||||
switch_core_hash_init(&globals.call_hash);
|
||||
switch_mutex_init(&globals.mutex, SWITCH_MUTEX_NESTED, module_pool);
|
||||
switch_mutex_init(&globals.hash_mutex, SWITCH_MUTEX_NESTED, module_pool);
|
||||
switch_mutex_init(&globals.channel_mutex, SWITCH_MUTEX_NESTED, module_pool);
|
||||
|
||||
Reference in new issue
Block a user