]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
re-set the sound prefix back to nothing after a phrase if it wasn't set before. ...
authorMichael Jerris <mike@jerris.com>
Mon, 14 Apr 2008 17:24:52 +0000 (17:24 +0000)
committerMichael Jerris <mike@jerris.com>
Mon, 14 Apr 2008 17:24:52 +0000 (17:24 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8109 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_play_say.c

index 3b5c5ead91a351ab3440a53b3bf0a101d3b0e77c..8bd0dab088a21e2a6ee6b878ae466a45f286a361 100644 (file)
@@ -176,10 +176,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_phrase_macro(switch_core_session_t *s
        }
 
        if (sound_path) {
-               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;
-               }
+               char *p;
+               old_sound_prefix = switch_str_nil(switch_channel_get_variable(channel, "sound_prefix"));
+               p = switch_core_session_strdup(session, old_sound_prefix);
+               old_sound_prefix = p;
                switch_channel_set_variable(channel, "sound_prefix", sound_path);
        }