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

FreeSWITCH SVN mrene at freeswitch.org
Sat Apr 11 16:21:17 PDT 2009


Author: mrene
Date: Sat Apr 11 18:21:17 2009
New Revision: 13006

Log:
oups that wasnt on a pool

Modified:
   freeswitch/trunk/src/switch_ivr_menu.c

Modified: freeswitch/trunk/src/switch_ivr_menu.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_menu.c	(original)
+++ freeswitch/trunk/src/switch_ivr_menu.c	Sat Apr 11 18:21:17 2009
@@ -291,13 +291,14 @@
 	switch_status_t status = SWITCH_STATUS_FALSE;
 	switch_input_args_t args = { 0 };
 	switch_channel_t *channel;
+	char *sound_expanded = sound;
 
 	if (!session || !menu || switch_strlen_zero(sound)) {
 		return status;
 	}
 
 	if ((channel = switch_core_session_get_channel(session))) {
-		sound = switch_channel_expand_variables(channel, sound);
+		sound_expanded = switch_channel_expand_variables(channel, sound);
 	}
 
 	memset(menu->buf, 0, menu->inlen + 1);
@@ -313,7 +314,11 @@
 	args.buf = ptr;
 	args.buflen = len;
 
-	status = switch_ivr_play_file(session, NULL, sound, &args);
+	status = switch_ivr_play_file(session, NULL, sound_expanded, &args);
+	
+	if (sound_expanded != sound) {
+		switch_safe_free(sound_expanded);
+	}
 
 	if (!need) {
 		return status;



More information about the Freeswitch-svn mailing list