xml_config: change min/max enforcements to >= instead of >

This commit is contained in:
Mathieu Rene 2011-02-06 01:28:09 -05:00
parent 2944364863
commit 0d5fcf65a0
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ SWITCH_DECLARE(switch_status_t) switch_xml_config_parse_event(switch_event_t *ev
if (int_options) {
/* Enforce validation options */
if ((int_options->enforce_min && !(intval > int_options->min)) || (int_options->enforce_max && !(intval < int_options->max))) {
if ((int_options->enforce_min && !(intval >= int_options->min)) || (int_options->enforce_max && !(intval <= int_options->max))) {
/* Validation failed, set default */
intval = (int) (intptr_t) item->defaultvalue;
/* Then complain */