From: Mathieu Rene Date: Sat, 11 Apr 2009 23:21:17 +0000 (+0000) Subject: oups that wasnt on a pool X-Git-Tag: v1.0.4~1183 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8e798960a74ae5fe551aee55a5543dd4a8c292d7;p=thirdparty%2Ffreeswitch.git oups that wasnt on a pool git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13006 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/switch_ivr_menu.c b/src/switch_ivr_menu.c index 50e1a09d79..ba2c9746d7 100644 --- a/src/switch_ivr_menu.c +++ b/src/switch_ivr_menu.c @@ -291,13 +291,14 @@ static switch_status_t play_and_collect(switch_core_session_t *session, switch_i 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 @@ static switch_status_t play_and_collect(switch_core_session_t *session, switch_i 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;