mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-08 20:43:51 +00:00
FS-6402 --resolve
This commit is contained in:
1 parent
2c7c041f50
commit
5c0cff70b3
50 files changed
+161
-149
No files matched your search
@@ -279,7 +279,7 @@ static void do_rotate_all()
|
||||
}
|
||||
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_core_hash_first( globals.fd_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.fd_hash); hi; hi = switch_core_hash_next(&hi)) {
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
fd = (cdr_fd_t *) val;
|
||||
switch_mutex_lock(fd->mutex);
|
||||
@@ -296,7 +296,7 @@ static void do_teardown()
|
||||
void *val;
|
||||
cdr_fd_t *fd;
|
||||
switch_mutex_lock(globals.mutex);
|
||||
for (hi = switch_core_hash_first( globals.fd_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.fd_hash); hi; hi = switch_core_hash_next(&hi)) {
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
fd = (cdr_fd_t *) val;
|
||||
switch_mutex_lock(fd->mutex);
|
||||
|
||||
@@ -401,7 +401,7 @@ static void event_handler(switch_event_t *event)
|
||||
}
|
||||
|
||||
if (sig && !strcmp(sig, "HUP")) {
|
||||
for (hi = switch_core_hash_first( globals.fd_hash); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first( globals.fd_hash); hi; hi = switch_core_hash_next(&hi)) {
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
fd = (cdr_fd_t *) val;
|
||||
switch_mutex_lock(fd->mutex);
|
||||
|
||||
@@ -1132,7 +1132,7 @@ static switch_status_t handle_ref_tuple(listener_t *listener, erlang_msg * msg,
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hashed ref to %s\n", hash);
|
||||
|
||||
switch_thread_rwlock_rdlock(listener->session_rwlock);
|
||||
for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(iter)) {
|
||||
for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(&iter)) {
|
||||
switch_core_hash_this(iter, &key, NULL, &val);
|
||||
se = (session_elem_t*)val;
|
||||
if (se->spawn_reply && !strncmp(se->spawn_reply->hash, hash, 100)) {
|
||||
|
||||
@@ -364,7 +364,7 @@ session_elem_t *find_session_elem_by_pid(listener_t *listener, erlang_pid *pid)
|
||||
session_elem_t *session = NULL;
|
||||
|
||||
switch_thread_rwlock_rdlock(listener->session_rwlock);
|
||||
for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(iter)) {
|
||||
for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(&iter)) {
|
||||
switch_core_hash_this(iter, &key, NULL, &val);
|
||||
|
||||
if (((session_elem_t*)val)->process.type == ERLANG_PID && !ei_compare_pids(pid, &((session_elem_t*)val)->process.pid)) {
|
||||
@@ -644,7 +644,7 @@ static switch_status_t check_attached_sessions(listener_t *listener, int *msgs_s
|
||||
|
||||
/* TODO try to minimize critical section */
|
||||
switch_thread_rwlock_rdlock(listener->session_rwlock);
|
||||
for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(iter)) {
|
||||
for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(&iter)) {
|
||||
switch_core_hash_this(iter, &key, NULL, &value);
|
||||
sp = (session_elem_t*)value;
|
||||
if (switch_test_flag(sp, LFLAG_WAITING_FOR_PID)) {
|
||||
@@ -1333,7 +1333,7 @@ void destroy_listener(listener_t * listener)
|
||||
|
||||
/* clean up all the attached sessions */
|
||||
switch_thread_rwlock_wrlock(listener->session_rwlock);
|
||||
for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(iter)) {
|
||||
for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(&iter)) {
|
||||
switch_core_hash_this(iter, &key, NULL, &value);
|
||||
s = (session_elem_t*)value;
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Orphaning call %s\n", s->uuid_str);
|
||||
@@ -1529,7 +1529,7 @@ int count_listener_sessions(listener_t *listener)
|
||||
switch_hash_index_t *iter;
|
||||
|
||||
switch_thread_rwlock_rdlock(listener->session_rwlock);
|
||||
for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(iter)) {
|
||||
for (iter = switch_core_hash_first( listener->sessions); iter; iter = switch_core_hash_next(&iter)) {
|
||||
count++;
|
||||
}
|
||||
switch_thread_rwlock_unlock(listener->session_rwlock);
|
||||
@@ -1750,7 +1750,7 @@ SWITCH_STANDARD_API(erlang_cmd)
|
||||
|
||||
found = 1;
|
||||
switch_thread_rwlock_rdlock(l->session_rwlock);
|
||||
for (iter = switch_core_hash_first( l->sessions); iter; iter = switch_core_hash_next(iter)) {
|
||||
for (iter = switch_core_hash_first( l->sessions); iter; iter = switch_core_hash_next(&iter)) {
|
||||
empty = 0;
|
||||
switch_core_hash_this(iter, &key, NULL, &value);
|
||||
sp = (session_elem_t*)value;
|
||||
@@ -1791,7 +1791,7 @@ SWITCH_STANDARD_API(erlang_cmd)
|
||||
}
|
||||
stream->write_function(stream, "CUSTOM:\n", switch_event_name(x));
|
||||
|
||||
for (iter = switch_core_hash_first( l->event_hash); iter; iter = switch_core_hash_next(iter)) {
|
||||
for (iter = switch_core_hash_first( l->event_hash); iter; iter = switch_core_hash_next(&iter)) {
|
||||
switch_core_hash_this(iter, &key, NULL, &val);
|
||||
stream->write_function(stream, "\t%s\n", (char *)key);
|
||||
}
|
||||
|
||||
@@ -247,7 +247,7 @@ static void event_handler(switch_event_t *event)
|
||||
struct peer_status *last;
|
||||
char *host;
|
||||
|
||||
for (cur = switch_core_hash_first( globals.peer_hash); cur; cur = switch_core_hash_next(cur)) {
|
||||
for (cur = switch_core_hash_first( globals.peer_hash); cur; cur = switch_core_hash_next(&cur)) {
|
||||
switch_core_hash_this(cur, &key, &keylen, &value);
|
||||
host = (char *) key;
|
||||
last = (struct peer_status *) value;
|
||||
@@ -351,7 +351,7 @@ SWITCH_STANDARD_API(multicast_peers)
|
||||
char *host;
|
||||
int i = 0;
|
||||
|
||||
for (cur = switch_core_hash_first( globals.peer_hash); cur; cur = switch_core_hash_next(cur)) {
|
||||
for (cur = switch_core_hash_first( globals.peer_hash); cur; cur = switch_core_hash_next(&cur)) {
|
||||
switch_core_hash_this(cur, &key, &keylen, &value);
|
||||
host = (char *) key;
|
||||
last = (struct peer_status *) value;
|
||||
|
||||
@@ -495,7 +495,7 @@ static switch_status_t my_on_reporting(switch_core_session_t *session)
|
||||
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
|
||||
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)) {
|
||||
cdr_profile_t *profile;
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (cdr_profile_t *) val;
|
||||
@@ -518,7 +518,7 @@ static void event_handler(switch_event_t *event)
|
||||
const char *sig = switch_event_get_header(event, "Trapped-Signal");
|
||||
|
||||
if (sig && !strcmp(sig, "HUP")) {
|
||||
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)) {
|
||||
cdr_profile_t *profile;
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (cdr_profile_t *) val;
|
||||
@@ -785,7 +785,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_format_cdr_shutdown)
|
||||
switch_event_unbind(&globals.node);
|
||||
switch_core_remove_state_handler(&state_handlers);
|
||||
|
||||
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)) {
|
||||
cdr_profile_t *profile;
|
||||
switch_core_hash_this(hi, NULL, NULL, &val);
|
||||
profile = (cdr_profile_t *) val;
|
||||
|
||||
@@ -498,7 +498,7 @@ static void pause_when_offline(void)
|
||||
|
||||
switch_mutex_lock(globals.clients_mutex);
|
||||
|
||||
for (hi = switch_core_hash_first(globals.clients_roster); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(globals.clients_roster); hi; hi = switch_core_hash_next(&hi)) {
|
||||
const void *key;
|
||||
void *client;
|
||||
switch_core_hash_this(hi, &key, NULL, &client);
|
||||
@@ -529,7 +529,7 @@ static void broadcast_event(struct rayo_actor *from, iks *rayo_event, int online
|
||||
{
|
||||
switch_hash_index_t *hi = NULL;
|
||||
switch_mutex_lock(globals.clients_mutex);
|
||||
for (hi = switch_core_hash_first(globals.clients_roster); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(globals.clients_roster); hi; hi = switch_core_hash_next(&hi)) {
|
||||
struct rayo_client *rclient;
|
||||
const void *key;
|
||||
void *val;
|
||||
@@ -572,7 +572,7 @@ static struct dial_gateway *dial_gateway_find(const char *uri)
|
||||
|
||||
/* find longest prefix match */
|
||||
switch_mutex_lock(globals.dial_gateways_mutex);
|
||||
for (hi = switch_core_hash_first(globals.dial_gateways); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(globals.dial_gateways); hi; hi = switch_core_hash_next(&hi)) {
|
||||
struct dial_gateway *candidate = NULL;
|
||||
const void *prefix;
|
||||
int prefix_len = 0;
|
||||
@@ -1111,7 +1111,7 @@ static void rayo_call_cleanup(struct rayo_actor *actor)
|
||||
}
|
||||
|
||||
/* send <end> to all offered clients */
|
||||
for (hi = switch_core_hash_first(call->pcps); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(call->pcps); hi; hi = switch_core_hash_next(&hi)) {
|
||||
const void *key;
|
||||
void *val;
|
||||
const char *client_jid = NULL;
|
||||
@@ -2898,7 +2898,7 @@ static void broadcast_mixer_event(struct rayo_mixer *mixer, iks *rayo_event)
|
||||
{
|
||||
switch_hash_index_t *hi = NULL;
|
||||
switch_mutex_lock(RAYO_ACTOR(mixer)->mutex);
|
||||
for (hi = switch_core_hash_first(mixer->subscribers); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(mixer->subscribers); hi; hi = switch_core_hash_next(&hi)) {
|
||||
const void *key;
|
||||
void *val;
|
||||
struct rayo_mixer_subscriber *subscriber;
|
||||
@@ -3615,7 +3615,7 @@ SWITCH_STANDARD_APP(rayo_app)
|
||||
/* Offer call to all ONLINE clients */
|
||||
/* TODO load balance offers so first session doesn't always get offer first? */
|
||||
switch_mutex_lock(globals.clients_mutex);
|
||||
for (hi = switch_core_hash_first(globals.clients_roster); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(globals.clients_roster); hi; hi = switch_core_hash_next(&hi)) {
|
||||
struct rayo_client *rclient;
|
||||
const void *key;
|
||||
void *val;
|
||||
@@ -4059,7 +4059,7 @@ static int dump_api(const char *cmd, switch_stream_handle_t *stream)
|
||||
|
||||
stream->write_function(stream, "\nENTITIES\n");
|
||||
switch_mutex_lock(globals.actors_mutex);
|
||||
for (hi = switch_core_hash_first(globals.actors); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(globals.actors); hi; hi = switch_core_hash_next(&hi)) {
|
||||
struct rayo_actor *actor = NULL;
|
||||
const void *key;
|
||||
void *val;
|
||||
@@ -4071,7 +4071,7 @@ static int dump_api(const char *cmd, switch_stream_handle_t *stream)
|
||||
stream->write_function(stream, "\n");
|
||||
}
|
||||
|
||||
for (hi = switch_core_hash_first(globals.destroy_actors); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(globals.destroy_actors); hi; hi = switch_core_hash_next(&hi)) {
|
||||
struct rayo_actor *actor = NULL;
|
||||
const void *key;
|
||||
void *val;
|
||||
@@ -4370,7 +4370,7 @@ static switch_status_t list_actors(const char *line, const char *cursor, switch_
|
||||
struct rayo_actor *actor;
|
||||
|
||||
switch_mutex_lock(globals.actors_mutex);
|
||||
for (hi = switch_core_hash_first(globals.actors); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(globals.actors); hi; hi = switch_core_hash_next(&hi)) {
|
||||
switch_core_hash_this(hi, &vvar, NULL, &val);
|
||||
|
||||
actor = (struct rayo_actor *) val;
|
||||
|
||||
@@ -133,7 +133,7 @@ static void subscriber_execute(const char *uuid, const char *signal_type, subscr
|
||||
switch_hash_index_t *hi = NULL;
|
||||
switch_hash_t *signal_subscribers = switch_core_hash_find(globals.subscribers, key);
|
||||
if (signal_subscribers) {
|
||||
for (hi = switch_core_hash_first(signal_subscribers); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(signal_subscribers); hi; hi = switch_core_hash_next(&hi)) {
|
||||
const void *jid;
|
||||
void *dont_care;
|
||||
switch_core_hash_this(hi, &jid, NULL, &dont_care);
|
||||
@@ -161,7 +161,7 @@ static void stop_cpa_detectors(struct cpa_component *cpa)
|
||||
{
|
||||
if (cpa->signals) {
|
||||
switch_hash_index_t *hi = NULL;
|
||||
for (hi = switch_core_hash_first(cpa->signals); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(cpa->signals); hi; hi = switch_core_hash_next(&hi)) {
|
||||
const void *signal_type;
|
||||
void *cpa_signal = NULL;
|
||||
switch_core_hash_this(hi, &signal_type, NULL, &cpa_signal);
|
||||
|
||||
@@ -393,7 +393,7 @@ static switch_status_t rayo_cpa_detector_signal_types(const char *line, const ch
|
||||
switch_console_callback_match_t *my_matches = NULL;
|
||||
|
||||
switch_mutex_lock(globals.detectors_mutex);
|
||||
for (hi = switch_core_hash_first(globals.detectors); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(globals.detectors); hi; hi = switch_core_hash_next(&hi)) {
|
||||
switch_core_hash_this(hi, &vvar, NULL, &val);
|
||||
switch_console_push_match(&my_matches, (const char *) vvar);
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ static switch_status_t input_handler_on_dtmf(switch_core_session_t *session, con
|
||||
switch_mutex_lock(handler->mutex);
|
||||
|
||||
/* check input on each component */
|
||||
for (hi = switch_core_hash_first(handler->dtmf_components); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(handler->dtmf_components); hi; hi = switch_core_hash_next(&hi)) {
|
||||
const void *jid;
|
||||
void *component;
|
||||
switch_core_hash_this(hi, &jid, NULL, &component);
|
||||
@@ -330,7 +330,7 @@ static switch_bool_t input_handler_bug_callback(switch_media_bug_t *bug, void *u
|
||||
switch_event_t *components_to_remove = NULL;
|
||||
|
||||
/* check timeout/stop on each component */
|
||||
for (hi = switch_core_hash_first(handler->dtmf_components); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(handler->dtmf_components); hi; hi = switch_core_hash_next(&hi)) {
|
||||
const void *jid;
|
||||
void *component;
|
||||
switch_core_hash_this(hi, &jid, NULL, &component);
|
||||
@@ -356,7 +356,7 @@ static switch_bool_t input_handler_bug_callback(switch_media_bug_t *bug, void *u
|
||||
}
|
||||
case SWITCH_ABC_TYPE_CLOSE:
|
||||
/* complete all components */
|
||||
for (hi = switch_core_hash_first(handler->dtmf_components); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(handler->dtmf_components); hi; hi = switch_core_hash_next(&hi)) {
|
||||
const void *jid;
|
||||
void *component;
|
||||
switch_core_hash_this(hi, &jid, NULL, &component);
|
||||
|
||||
@@ -872,7 +872,7 @@ void srgs_parser_destroy(struct srgs_parser *parser)
|
||||
switch_hash_index_t *hi = NULL;
|
||||
|
||||
/* clean up all cached grammars */
|
||||
for (hi = switch_core_hash_first(parser->cache); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(parser->cache); hi; hi = switch_core_hash_next(&hi)) {
|
||||
struct srgs_grammar *grammar = NULL;
|
||||
const void *key;
|
||||
void *val;
|
||||
|
||||
@@ -1729,7 +1729,7 @@ void xmpp_stream_context_dump(struct xmpp_stream_context *context, switch_stream
|
||||
switch_hash_index_t *hi;
|
||||
switch_mutex_lock(context->streams_mutex);
|
||||
stream->write_function(stream, "\nACTIVE STREAMS\n");
|
||||
for (hi = switch_core_hash_first(context->streams); hi; hi = switch_core_hash_next(hi)) {
|
||||
for (hi = switch_core_hash_first(context->streams); hi; hi = switch_core_hash_next(&hi)) {
|
||||
struct xmpp_stream *s = NULL;
|
||||
const void *key;
|
||||
void *val;
|
||||
|
||||
Reference in new issue
Block a user