add disable_app_log variable
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8517 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9b2b3beed2
commit
91e270907b
|
@ -140,6 +140,7 @@ SWITCH_BEGIN_EXTERN_C
|
|||
#define SWITCH_EXEC_AFTER_BRIDGE_APP_VARIABLE "exec_after_bridge_app"
|
||||
#define SWITCH_EXEC_AFTER_BRIDGE_ARG_VARIABLE "exec_after_bridge_arg"
|
||||
#define SWITCH_MAX_FORWARDS_VARIABLE "max_forwards"
|
||||
#define SWITCH_DISABLE_APP_LOG_VARIABLE "disable_app_log"
|
||||
#define SWITCH_SPEECH_KEY "speech"
|
||||
#define SWITCH_UUID_BRIDGE "uuid_bridge"
|
||||
#define SWITCH_BITS_PER_BYTE 8
|
||||
|
|
|
@ -1013,22 +1013,25 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_exec(switch_core_session_t *
|
|||
const switch_application_interface_t *application_interface, const char *arg) {
|
||||
switch_app_log_t *log, *lp;
|
||||
switch_event_t *event;
|
||||
const char *var;
|
||||
|
||||
if (!arg) {
|
||||
arg = "";
|
||||
}
|
||||
|
||||
log = switch_core_session_alloc(session, sizeof(*log));
|
||||
if (!(var = switch_channel_get_variable(session->channel, SWITCH_DISABLE_APP_LOG_VARIABLE)) || (!(switch_true(var)))) {
|
||||
log = switch_core_session_alloc(session, sizeof(*log));
|
||||
|
||||
log->app = switch_core_session_strdup(session, application_interface->interface_name);
|
||||
log->arg = switch_core_session_strdup(session, arg);
|
||||
log->app = switch_core_session_strdup(session, application_interface->interface_name);
|
||||
log->arg = switch_core_session_strdup(session, arg);
|
||||
|
||||
for(lp = session->app_log; lp && lp->next; lp = lp->next);
|
||||
for(lp = session->app_log; lp && lp->next; lp = lp->next);
|
||||
|
||||
if (lp) {
|
||||
lp->next = log;
|
||||
} else {
|
||||
session->app_log = log;
|
||||
if (lp) {
|
||||
lp->next = log;
|
||||
} else {
|
||||
session->app_log = log;
|
||||
}
|
||||
}
|
||||
|
||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
|
||||
|
|
Loading…
Reference in New Issue