use the non-signal checking version of switch_channel_up/down in the core

This commit is contained in:
Anthony Minessale
2011-11-18 13:17:56 -06:00
parent 4c0bc25864
commit 9ecf187dd9
7 changed files with 43 additions and 43 deletions
+7 -7
View File
@@ -231,7 +231,7 @@ SWITCH_DECLARE(void) switch_core_session_hupall_matching_var(const char *var_nam
for(np = head; np; np = np->next) {
if ((session = switch_core_session_locate(np->str))) {
const char *this_val;
if (switch_channel_up(session->channel) &&
if (switch_channel_up_nosig(session->channel) &&
(this_val = switch_channel_get_variable(session->channel, var_name)) && (!strcmp(this_val, var_val))) {
switch_channel_hangup(session->channel, cause);
}
@@ -330,7 +330,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_message_send(const char *uui
if ((session = switch_core_hash_find(session_manager.session_table, uuid_str)) != 0) {
/* Acquire a read lock on the session or forget it the channel is dead */
if (switch_core_session_read_lock(session) == SWITCH_STATUS_SUCCESS) {
if (switch_channel_up(session->channel)) {
if (switch_channel_up_nosig(session->channel)) {
status = switch_core_session_receive_message(session, message);
}
switch_core_session_rwunlock(session);
@@ -350,7 +350,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_event_send(const char *uuid_
if ((session = switch_core_hash_find(session_manager.session_table, uuid_str)) != 0) {
/* Acquire a read lock on the session or forget it the channel is dead */
if (switch_core_session_read_lock(session) == SWITCH_STATUS_SUCCESS) {
if (switch_channel_up(session->channel)) {
if (switch_channel_up_nosig(session->channel)) {
status = switch_core_session_queue_event(session, event);
}
switch_core_session_rwunlock(session);
@@ -684,7 +684,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
goto end;
}
if (switch_channel_down(session->channel) && message->message_id != SWITCH_MESSAGE_INDICATE_SIGNAL_DATA) {
if (switch_channel_down_nosig(session->channel) && message->message_id != SWITCH_MESSAGE_INDICATE_SIGNAL_DATA) {
switch_log_printf(SWITCH_CHANNEL_ID_LOG, message->_file, message->_func, message->_line,
switch_core_session_get_uuid(session), SWITCH_LOG_DEBUG, "%s skip receive message [%s] (channel is hungup already)\n",
switch_channel_get_name(session->channel), message_names[message->message_id]);
@@ -705,7 +705,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_perform_receive_message(swit
message->_func = NULL;
message->_line = 0;
if (switch_channel_up(session->channel)) {
if (switch_channel_up_nosig(session->channel)) {
switch (message->message_id) {
case SWITCH_MESSAGE_REDIRECT_AUDIO:
case SWITCH_MESSAGE_INDICATE_ANSWER:
@@ -904,7 +904,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_receive_event(switch_core_se
/* Acquire a read lock on the session or forget it the channel is dead */
if (switch_core_session_read_lock(session) == SWITCH_STATUS_SUCCESS) {
if (switch_channel_up(session->channel)) {
if (switch_channel_up_nosig(session->channel)) {
if (session->endpoint_interface->io_routines->receive_event) {
status = session->endpoint_interface->io_routines->receive_event(session, *event);
}
@@ -2063,7 +2063,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application_get_flag
switch_application_interface_t *application_interface;
switch_status_t status = SWITCH_STATUS_SUCCESS;
if (switch_channel_down(session->channel)) {
if (switch_channel_down_nosig(session->channel)) {
char *p;
if (!arg && (p = strstr(app, "::"))) {
*p++ = '0';