mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-07-12 18:17:59 +00:00
clean up arg vs expanded
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11574 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9b87017b19
commit
5433ba1daa
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
* FreeSWITCH Modular Media Switching Software Library / Soft-Switch Application
|
||||||
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
* Copyright (C) 2005/2006, Anthony Minessale II <anthmct@yahoo.com>
|
||||||
@ -592,7 +593,8 @@ SWITCH_DECLARE(switch_status_t) switch_channel_set_variable_var_check(switch_cha
|
|||||||
if (ok) {
|
if (ok) {
|
||||||
switch_event_add_header_string(channel->variables, SWITCH_STACK_BOTTOM, varname, value);
|
switch_event_add_header_string(channel->variables, SWITCH_STACK_BOTTOM, varname, value);
|
||||||
} else {
|
} else {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Invalid data (contains a variable)\n");
|
abort();
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Invalid data (${%s} contains a variable)\n", varname);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch_mutex_unlock(channel->profile_mutex);
|
switch_mutex_unlock(channel->profile_mutex);
|
||||||
|
@ -1299,7 +1299,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
|||||||
log = switch_core_session_alloc(session, sizeof(*log));
|
log = switch_core_session_alloc(session, sizeof(*log));
|
||||||
|
|
||||||
log->app = switch_core_session_strdup(session, application_interface->interface_name);
|
log->app = switch_core_session_strdup(session, application_interface->interface_name);
|
||||||
log->arg = switch_core_session_strdup(session, arg);
|
log->arg = switch_core_session_strdup(session, expanded);
|
||||||
|
|
||||||
for (lp = session->app_log; lp && lp->next; lp = lp->next);
|
for (lp = session->app_log; lp && lp->next; lp = lp->next);
|
||||||
|
|
||||||
@ -1311,13 +1311,13 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_VARIABLE, application_interface->interface_name);
|
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_VARIABLE, application_interface->interface_name);
|
||||||
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_DATA_VARIABLE, arg);
|
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_DATA_VARIABLE, expanded);
|
||||||
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, NULL);
|
switch_channel_set_variable(channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE, NULL);
|
||||||
|
|
||||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
|
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
|
||||||
switch_channel_event_set_data(session->channel, event);
|
switch_channel_event_set_data(session->channel, event);
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application", application_interface->interface_name);
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application", application_interface->interface_name);
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-Data", arg);
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-Data", expanded);
|
||||||
switch_event_fire(&event);
|
switch_event_fire(&event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1333,7 +1333,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
|||||||
const char *resp = switch_channel_get_variable(session->channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE);
|
const char *resp = switch_channel_get_variable(session->channel, SWITCH_CURRENT_APPLICATION_RESPONSE_VARIABLE);
|
||||||
switch_channel_event_set_data(session->channel, event);
|
switch_channel_event_set_data(session->channel, event);
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application", application_interface->interface_name);
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application", application_interface->interface_name);
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-Data", arg);
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-Data", expanded);
|
||||||
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-Response", resp ? resp : "_none_");
|
switch_event_add_header_string(event, SWITCH_STACK_BOTTOM, "Application-Response", resp ? resp : "_none_");
|
||||||
switch_event_fire(&event);
|
switch_event_fire(&event);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user