]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
DP-10
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 21 Dec 2009 19:11:34 +0000 (19:11 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 21 Dec 2009 19:11:34 +0000 (19:11 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16011 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_play_say.c

index a22821a95a3e12f857abea179e1fcf099f8c80a5..167605017ca4a5e3e721ff8d42adc3e9a2115279 100644 (file)
@@ -1726,6 +1726,7 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
                                                                                                                   const char *digits_regex)
 {
        switch_channel_t *channel = switch_core_session_get_channel(session);
+       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_ERROR, "enter to switch_play_and_get_digits.\n");
 
        while(switch_channel_ready(channel) && max_tries) {
                switch_status_t status;
@@ -1738,6 +1739,11 @@ SWITCH_DECLARE(switch_status_t) switch_play_and_get_digits(switch_core_session_t
                        status = SWITCH_STATUS_SUCCESS;
                }
 
+                if (status == SWITCH_STATUS_TOO_SMALL && strlen(digit_buffer) == 0) {
+                        return SWITCH_STATUS_FALSE;
+                }
+                                                        
+
                if (status == SWITCH_STATUS_SUCCESS) {
                        if (!zstr(digit_buffer)) {
                                if (zstr(digits_regex)) {