changeset 2085:505af86ac9cb

show an error message for invalid parameter
author Igor Sysoev <igor@sysoev.ru>
date Thu, 03 Jul 2008 19:19:45 +0000
parents 5baf7e5b2d6e
children 22d36702c654
files src/http/ngx_http_core_module.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -3499,7 +3499,7 @@ ngx_http_core_open_file_cache(ngx_conf_t
 
             max = ngx_atoi(value[i].data + 4, value[i].len - 4);
             if (max == NGX_ERROR) {
-                return NGX_CONF_ERROR;
+                goto failed;
             }
 
             continue;
@@ -3512,7 +3512,7 @@ ngx_http_core_open_file_cache(ngx_conf_t
 
             inactive = ngx_parse_time(&s, 1);
             if (inactive < 0) {
-                return NGX_CONF_ERROR;
+                goto failed;
             }
 
             continue;
@@ -3525,6 +3525,8 @@ ngx_http_core_open_file_cache(ngx_conf_t
             continue;
         }
 
+    failed:
+
         ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                            "invalid \"open_file_cache\" parameter \"%V\"",
                            &value[i]);