]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FSCORE-554
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 19 Feb 2010 18:59:10 +0000 (18:59 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 19 Feb 2010 18:59:10 +0000 (18:59 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16706 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_play_say.c

index a7ae634b6ddebf98438c7506f698c86735375699..df73fa799bdb2c3be1f0f60ce446a8db1e5a7e6b 100644 (file)
@@ -1732,21 +1732,18 @@ 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)) {
-                                       return SWITCH_STATUS_SUCCESS;
-                               }
-                               switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Test Regex [%s][%s]\n", digit_buffer, digits_regex);
-                               if (switch_regex_match(digit_buffer, digits_regex) == SWITCH_STATUS_SUCCESS) {
-                                       return SWITCH_STATUS_SUCCESS;
-                               } else {
-                                       switch_channel_set_variable(channel, var_name, NULL);
+               if (!(status == SWITCH_STATUS_TOO_SMALL && strlen(digit_buffer) == 0)) {
+                       if (status == SWITCH_STATUS_SUCCESS) {
+                               if (!zstr(digit_buffer)) {
+                                       if (zstr(digits_regex)) {
+                                               return SWITCH_STATUS_SUCCESS;
+                                       }
+                                       switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Test Regex [%s][%s]\n", digit_buffer, digits_regex);
+                                       if (switch_regex_match(digit_buffer, digits_regex) == SWITCH_STATUS_SUCCESS) {
+                                               return SWITCH_STATUS_SUCCESS;
+                                       } else {
+                                               switch_channel_set_variable(channel, var_name, NULL);
+                                       }
                                }
                        }
                }