Mercurial > hg > nginx
comparison 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 |
comparison
equal
deleted
inserted
replaced
171:aff0e5d32af8 | 172:caa57ddf6d77 |
---|---|
803 char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data) | 803 char *ngx_conf_check_num_bounds(ngx_conf_t *cf, void *post, void *data) |
804 { | 804 { |
805 ngx_conf_num_bounds_t *bounds = post; | 805 ngx_conf_num_bounds_t *bounds = post; |
806 int *np = data; | 806 int *np = data; |
807 | 807 |
808 if (*np >= bounds->low && (u_int) *np <= (u_int) bounds->high) { | 808 if (bounds->high == -1) { |
809 if (*np >= bounds->low) { | |
810 return NGX_CONF_OK; | |
811 } | |
812 | |
813 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | |
814 "value must be more than %d", bounds->low); | |
815 | |
816 return NGX_CONF_ERROR; | |
817 } | |
818 | |
819 if (*np >= bounds->low && *np <= bounds->high) { | |
809 return NGX_CONF_OK; | 820 return NGX_CONF_OK; |
810 } | 821 } |
811 | 822 |
812 return "invalid value"; | 823 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
813 } | 824 "value must be between %d and %d", |
825 bounds->low, bounds->high); | |
826 | |
827 return NGX_CONF_ERROR; | |
828 } |