diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-11-03 22:20:44 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-11-03 22:20:44 +0000 |
commit | cf80a70e1030f3c12e9b19e34e4f9ee9e2f72629 (patch) | |
tree | 0611cee87cc3d27340cff7fc8d324f6f61ad56b7 /src/core/ngx_conf_file.c | |
parent | a1512b1904fc7e3a0a5b99e49cff480085518445 (diff) | |
download | nginx-cf80a70e1030f3c12e9b19e34e4f9ee9e2f72629.tar.gz nginx-cf80a70e1030f3c12e9b19e34e4f9ee9e2f72629.zip |
nginx-0.0.1-2003-11-04-01:20:44 import
Diffstat (limited to 'src/core/ngx_conf_file.c')
-rw-r--r-- | src/core/ngx_conf_file.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c index 60d68a06c..7214e1f14 100644 --- 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_t *cf, void *post, void *data) 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; } |