fix var condition in macros

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8051 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2008-04-07 19:35:51 +00:00
parent 80268774a0
commit b97a5f9060
1 changed files with 5 additions and 1 deletions

View File

@ -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);