From b97a5f9060194b1417988fa333e6303fb1e71134 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 7 Apr 2008 19:35:51 +0000 Subject: [PATCH] fix var condition in macros git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8051 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_ivr_play_say.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/switch_ivr_play_say.c b/src/switch_ivr_play_say.c index c804b555b0..14af1c8ab6 100644 --- a/src/switch_ivr_play_say.c +++ b/src/switch_ivr_play_say.c @@ -176,7 +176,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s } if (sound_path) { - old_sound_prefix = switch_channel_get_variable(channel, "sound_prefix"); + if ((old_sound_prefix = switch_channel_get_variable(channel, "sound_prefix"))) { + char *p = switch_core_session_strdup(session, old_sound_prefix); + old_sound_prefix = p; + } switch_channel_set_variable(channel, "sound_prefix", sound_path); } @@ -747,6 +750,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_play_file(switch_core_session_t *sess prefix = SWITCH_GLOBAL_dirs.base_dir; } + if (!strstr(file, SWITCH_URL_SEPARATOR)) { if (!switch_is_file_path(file)) { file = switch_core_session_sprintf(session, "%s%s%s", prefix, SWITCH_PATH_SEPARATOR, file);