]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
if valid_terminators string starts with = it implies one of them must be typed
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 28 Jun 2012 18:17:52 +0000 (13:17 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 28 Jun 2012 18:17:57 +0000 (13:17 -0500)
src/switch_ivr_play_say.c

index 8738071cb4db44a8890c68aa521b61da5da3ee82..c483ccfbedd1f1faf2c3a333850b910fc13421d3 100644 (file)
@@ -1879,6 +1879,12 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session,
        switch_status_t status = SWITCH_STATUS_SUCCESS;
        size_t len = 0;
        char tb[2] = "";
+       int term_required = 0;
+       
+
+       if (*valid_terminators == '=') {
+               term_required = 1;
+       }
 
        switch_assert(session);
 
@@ -1945,6 +1951,8 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_read(switch_core_session_t *session,
                                }
                        }
                }
+       } else if (term_required) {
+               status = SWITCH_STATUS_TOO_SMALL;
        }
 
        len = strlen(digit_buffer);