mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-25 03:10:39 +00:00
M-x whitespace-cleanup
This commit is contained in:
parent
130e1c8774
commit
82af87f3ae
@ -629,10 +629,10 @@ static void cancel_caller_outbound_call(const char *key, switch_call_cause_t cau
|
||||
if (!key) return;
|
||||
|
||||
switch_mutex_lock(globals.caller_orig_mutex);
|
||||
if ((cancel_cause = (switch_call_cause_t *) switch_core_hash_find(globals.caller_orig_hash, key))) {
|
||||
if ((cancel_cause = (switch_call_cause_t *) switch_core_hash_find(globals.caller_orig_hash, key))) {
|
||||
*cancel_cause = cause;
|
||||
}
|
||||
switch_mutex_unlock(globals.caller_orig_mutex);
|
||||
switch_mutex_unlock(globals.caller_orig_mutex);
|
||||
|
||||
fifo_caller_del(key);
|
||||
|
||||
@ -709,10 +709,10 @@ static void cancel_consumer_outbound_call(const char *key, switch_call_cause_t c
|
||||
if (!key) return;
|
||||
|
||||
switch_mutex_lock(globals.consumer_orig_mutex);
|
||||
if ((cancel_cause = (switch_call_cause_t *) switch_core_hash_find(globals.consumer_orig_hash, key))) {
|
||||
if ((cancel_cause = (switch_call_cause_t *) switch_core_hash_find(globals.consumer_orig_hash, key))) {
|
||||
*cancel_cause = cause;
|
||||
}
|
||||
switch_mutex_unlock(globals.consumer_orig_mutex);
|
||||
switch_mutex_unlock(globals.consumer_orig_mutex);
|
||||
|
||||
}
|
||||
|
||||
@ -988,8 +988,8 @@ static switch_status_t messagehook (switch_core_session_t *session, switch_core_
|
||||
if (!outbound_id) return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
switch (msg->message_id) {
|
||||
case SWITCH_MESSAGE_INDICATE_BRIDGE:
|
||||
case SWITCH_MESSAGE_INDICATE_UNBRIDGE:
|
||||
case SWITCH_MESSAGE_INDICATE_BRIDGE:
|
||||
case SWITCH_MESSAGE_INDICATE_UNBRIDGE:
|
||||
if (msg->numeric_arg == 42) {
|
||||
goto end;
|
||||
}
|
||||
@ -1011,9 +1011,9 @@ static switch_status_t messagehook (switch_core_session_t *session, switch_core_
|
||||
fifo_execute_sql(sql, globals.sql_mutex);
|
||||
switch_safe_free(sql);
|
||||
goto end;
|
||||
default:
|
||||
default:
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch (msg->message_id) {
|
||||
@ -1176,7 +1176,7 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
|
||||
int x = 0;
|
||||
switch_event_t *event;
|
||||
switch_uuid_t uuid;
|
||||
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
|
||||
char uuid_str[SWITCH_UUID_FORMATTED_LENGTH + 1];
|
||||
switch_call_cause_t cancel_cause = 0;
|
||||
char *uuid_list = NULL;
|
||||
int total = 0;
|
||||
@ -1191,8 +1191,8 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
|
||||
|
||||
if (!globals.running) goto dpool;
|
||||
|
||||
switch_uuid_get(&uuid);
|
||||
switch_uuid_format(uuid_str, &uuid);
|
||||
switch_uuid_get(&uuid);
|
||||
switch_uuid_format(uuid_str, &uuid);
|
||||
|
||||
if (!cbh->rowcount) {
|
||||
goto end;
|
||||
@ -1891,7 +1891,7 @@ static void check_ocancel(switch_core_session_t *session)
|
||||
|
||||
static void check_cancel(fifo_node_t *node)
|
||||
{
|
||||
int ppl_waiting;
|
||||
int ppl_waiting;
|
||||
|
||||
if (node->outbound_strategy != NODE_STRATEGY_ENTERPRISE) {
|
||||
return;
|
||||
@ -1899,13 +1899,13 @@ static void check_cancel(fifo_node_t *node)
|
||||
|
||||
ppl_waiting = node_caller_count(node);
|
||||
|
||||
if (node->ring_consumer_count > 0 && ppl_waiting < 1) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Outbound call count (%d) exceeds required value for queue %s (%d), "
|
||||
"Ending extraneous calls\n", node->ring_consumer_count, node->name, ppl_waiting);
|
||||
if (node->ring_consumer_count > 0 && ppl_waiting < 1) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Outbound call count (%d) exceeds required value for queue %s (%d), "
|
||||
"Ending extraneous calls\n", node->ring_consumer_count, node->name, ppl_waiting);
|
||||
|
||||
|
||||
switch_core_session_hupall_matching_var("fifo_hangup_check", node->name, SWITCH_CAUSE_ORIGINATOR_CANCEL);
|
||||
}
|
||||
switch_core_session_hupall_matching_var("fifo_hangup_check", node->name, SWITCH_CAUSE_ORIGINATOR_CANCEL);
|
||||
}
|
||||
}
|
||||
|
||||
static void send_presence(fifo_node_t *node)
|
||||
@ -2083,8 +2083,8 @@ static void dec_use_count(switch_core_session_t *session, switch_bool_t send_eve
|
||||
|
||||
static switch_status_t hanguphook(switch_core_session_t *session)
|
||||
{
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
switch_channel_state_t state = switch_channel_get_state(channel);
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
switch_channel_state_t state = switch_channel_get_state(channel);
|
||||
|
||||
if (state >= CS_HANGUP && !switch_channel_test_app_flag_key(FIFO_APP_KEY, channel, FIFO_APP_DID_HOOK)) {
|
||||
dec_use_count(session, SWITCH_TRUE);
|
||||
@ -3693,7 +3693,7 @@ SWITCH_STANDARD_API(fifo_api_function)
|
||||
|
||||
if (!strcasecmp(argv[0], "status")) {
|
||||
node_dump(stream);
|
||||
goto done;
|
||||
goto done;
|
||||
}
|
||||
|
||||
if (!strcasecmp(argv[0], "debug")) {
|
||||
@ -3703,7 +3703,7 @@ SWITCH_STANDARD_API(fifo_api_function)
|
||||
}
|
||||
}
|
||||
stream->write_function(stream, "debug %d\n", globals.debug);
|
||||
goto done;
|
||||
goto done;
|
||||
}
|
||||
|
||||
verbose = !strcasecmp(argv[0], "list_verbose");
|
||||
@ -4275,9 +4275,9 @@ static void fifo_member_del(char *fifo_name, char *originate_string)
|
||||
sql = switch_mprintf("select count(*) from fifo_outbound where fifo_name = '%q'", node->name);
|
||||
fifo_execute_sql_callback(globals.sql_mutex, sql, sql2str_callback, &cbt);
|
||||
if (atoi(outbound_count) > 0) {
|
||||
node->has_outbound = 1;
|
||||
node->has_outbound = 1;
|
||||
} else {
|
||||
node->has_outbound = 0;
|
||||
node->has_outbound = 0;
|
||||
}
|
||||
switch_safe_free(sql);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user