plug leak (FSCORE-164)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9182 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-07-28 15:38:52 +00:00
parent 23090c293d
commit 97a2c0c966
1 changed files with 6 additions and 2 deletions

View File

@ -1033,7 +1033,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application(switch_c
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Application %s Requires media on channel %s!\n",
app, switch_channel_get_name(session->channel));
} else if (!switch_test_flag(application_interface, SAF_SUPPORT_NOMEDIA) && !switch_channel_media_ready(session->channel)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Application %s Requires media! pre_answering channel %s\n",
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Application %s Requires media! pre_anyswering channel %s\n",
app, switch_channel_get_name(session->channel));
if (switch_channel_pre_answer(session->channel) != SWITCH_STATUS_SUCCESS) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Well, that didn't work very well did it? ...\n");
@ -1048,7 +1048,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_session_execute_application(switch_c
if (switch_channel_get_variable(session->channel, "presence_id")) {
char *myarg = NULL;
if (expanded) {
switch_mprintf("%s(%s)", app, expanded);
myarg = switch_mprintf("%s(%s)", app, expanded);
} else if (!switch_strlen_zero(arg)) {
myarg = switch_mprintf("%s(%s)", app, arg);
} else {
myarg = switch_mprintf("%s", app);
}
if (myarg) {
switch_channel_presence(session->channel, "unknown", myarg);