[Freeswitch-svn] [commit] r9182 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Mon Jul 28 11:38:53 EDT 2008


Author: mikej
Date: Mon Jul 28 11:38:52 2008
New Revision: 9182

Modified:
   freeswitch/trunk/src/switch_core_session.c

Log:
plug leak (FSCORE-164)

Modified: freeswitch/trunk/src/switch_core_session.c
==============================================================================
--- freeswitch/trunk/src/switch_core_session.c	(original)
+++ freeswitch/trunk/src/switch_core_session.c	Mon Jul 28 11:38:52 2008
@@ -1033,7 +1033,7 @@
 		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 @@
 	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);



More information about the Freeswitch-svn mailing list