]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
null out var on each new call to read app
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 11 Dec 2009 21:50:29 +0000 (21:50 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 11 Dec 2009 21:50:29 +0000 (21:50 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15918 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_play_say.c

index 1102acb4321e03d95209a8cc95d2435712ee4939..c08fe92a32aa1803b5b2beb8c9afc859774cc6c4 100644 (file)
@@ -1640,6 +1640,10 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session,
        channel = switch_core_session_get_channel(session);
        switch_channel_set_variable(channel, SWITCH_READ_RESULT_VARIABLE, NULL);
 
+       if (var_name) {
+               switch_channel_set_variable(channel, var_name, NULL);
+       }
+
        if ((min_digits && digit_buffer_length < min_digits) || digit_buffer_length < max_digits) {
                switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "Buffer too small!\n");
                return SWITCH_STATUS_FALSE;