mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-04 18:27:36 +00:00
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_APP_VARIABLE "exec_after_bridge_app"
|
||||||
#define SWITCH_EXEC_AFTER_BRIDGE_ARG_VARIABLE "exec_after_bridge_arg"
|
#define SWITCH_EXEC_AFTER_BRIDGE_ARG_VARIABLE "exec_after_bridge_arg"
|
||||||
#define SWITCH_MAX_FORWARDS_VARIABLE "max_forwards"
|
#define SWITCH_MAX_FORWARDS_VARIABLE "max_forwards"
|
||||||
|
#define SWITCH_DISABLE_APP_LOG_VARIABLE "disable_app_log"
|
||||||
#define SWITCH_SPEECH_KEY "speech"
|
#define SWITCH_SPEECH_KEY "speech"
|
||||||
#define SWITCH_UUID_BRIDGE "uuid_bridge"
|
#define SWITCH_UUID_BRIDGE "uuid_bridge"
|
||||||
#define SWITCH_BITS_PER_BYTE 8
|
#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) {
|
const switch_application_interface_t *application_interface, const char *arg) {
|
||||||
switch_app_log_t *log, *lp;
|
switch_app_log_t *log, *lp;
|
||||||
switch_event_t *event;
|
switch_event_t *event;
|
||||||
|
const char *var;
|
||||||
|
|
||||||
if (!arg) {
|
if (!arg) {
|
||||||
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->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, 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) {
|
if (lp) {
|
||||||
lp->next = log;
|
lp->next = log;
|
||||||
} else {
|
} else {
|
||||||
session->app_log = log;
|
session->app_log = log;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
|
if (switch_event_create(&event, SWITCH_EVENT_CHANNEL_EXECUTE) == SWITCH_STATUS_SUCCESS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user