From 7426376371bf2986609ef004d31e1e6420e04b84 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 24 Sep 2008 17:46:35 +0000 Subject: [PATCH] add debug line git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9636 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_channel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/switch_channel.c b/src/switch_channel.c index f442d7f890..c9fbf1fbb9 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -1563,7 +1563,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_chan switch_channel_set_variable(channel, "endpoint_disposition", "ANSWER"); switch_log_printf(SWITCH_CHANNEL_ID_LOG, file, func, line, NULL, SWITCH_LOG_NOTICE, "Channel [%s] has been answered\n", channel->name); - if ((var = switch_channel_get_variable(channel, SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE))) { + if ((var = switch_channel_get_variable(channel, SWITCH_CHANNEL_EXECUTE_ON_ANSWER_VARIABLE)) && !switch_strlen_zero(var)) { char *arg = NULL; app = switch_core_session_strdup(channel->session, var); @@ -1571,7 +1571,7 @@ SWITCH_DECLARE(switch_status_t) switch_channel_perform_mark_answered(switch_chan if ((arg = strchr(app, ' '))) { *arg++ = '\0'; } - + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s execute on answer: %s(%s)", channel->name, app, switch_str_nil(arg)); switch_core_session_execute_application(channel->session, app, arg); } return SWITCH_STATUS_SUCCESS;