Mercurial > hg > nginx
diff src/core/ngx_conf_file.c @ 172:caa57ddf6d77
nginx-0.0.1-2003-11-04-01:20:44 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 03 Nov 2003 22:20:44 +0000 |
parents | 8aef3c72e5da |
children | 4fb2a2cff023 |
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c @@ -805,9 +805,24 @@ char *ngx_conf_check_num_bounds(ngx_conf ngx_conf_num_bounds_t *bounds = post; int *np = data; - if (*np >= bounds->low && (u_int) *np <= (u_int) bounds->high) { + if (bounds->high == -1) { + if (*np >= bounds->low) { + return NGX_CONF_OK; + } + + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "value must be more than %d", bounds->low); + + return NGX_CONF_ERROR; + } + + if (*np >= bounds->low && *np <= bounds->high) { return NGX_CONF_OK; } - return "invalid value"; + ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, + "value must be between %d and %d", + bounds->low, bounds->high); + + return NGX_CONF_ERROR; }