summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2011-12-14 14:31:55 +0000
committerMaxim Dounin <mdounin@mdounin.ru>2011-12-14 14:31:55 +0000
commitaa96ac67fc96899551e555cdb616137525bbbb2e (patch)
tree8ff364e620ff2b30437035c100b171f751b73089 /src
parentb527aea8d1aed60fea5ed3db0b28f8cf4df37841 (diff)
downloadnginx-aa96ac67fc96899551e555cdb616137525bbbb2e.tar.gz
nginx-aa96ac67fc96899551e555cdb616137525bbbb2e.tar.bz2
Merge of r4270, r4274:
Minor cleanup: *) Changed error message to be more appropriate in the imaginary "open_file_cache max=0" case. *) Fixed NGX_CONF_TAKE1/NGX_CONF_FLAG misuse.
Diffstat (limited to 'src')
-rw-r--r--src/http/modules/ngx_http_fastcgi_module.c2
-rw-r--r--src/http/modules/ngx_http_ssi_filter_module.c4
-rw-r--r--src/http/modules/ngx_http_ssl_module.c2
-rw-r--r--src/http/ngx_http_core_module.c2
-rw-r--r--src/mail/ngx_mail_proxy_module.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/http/modules/ngx_http_fastcgi_module.c b/src/http/modules/ngx_http_fastcgi_module.c
index 48e238cbe..48c24bae6 100644
--- a/src/http/modules/ngx_http_fastcgi_module.c
+++ b/src/http/modules/ngx_http_fastcgi_module.c
@@ -431,7 +431,7 @@ static ngx_command_t ngx_http_fastcgi_commands[] = {
&ngx_http_upstream_ignore_headers_masks },
{ ngx_string("fastcgi_catch_stderr"),
- NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_str_array_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_fastcgi_loc_conf_t, catch_stderr),
diff --git a/src/http/modules/ngx_http_ssi_filter_module.c b/src/http/modules/ngx_http_ssi_filter_module.c
index 75a7156ef..0b8bc9bf8 100644
--- a/src/http/modules/ngx_http_ssi_filter_module.c
+++ b/src/http/modules/ngx_http_ssi_filter_module.c
@@ -139,14 +139,14 @@ static ngx_command_t ngx_http_ssi_filter_commands[] = {
NULL },
{ ngx_string("ssi_min_file_chunk"),
- NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_size_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ssi_loc_conf_t, min_file_chunk),
NULL },
{ ngx_string("ssi_value_length"),
- NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_FLAG,
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_HTTP_LOC_CONF|NGX_CONF_TAKE1,
ngx_conf_set_size_slot,
NGX_HTTP_LOC_CONF_OFFSET,
offsetof(ngx_http_ssi_loc_conf_t, value_len),
diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c
index f1f6a4ae4..0ac744ca1 100644
--- a/src/http/modules/ngx_http_ssl_module.c
+++ b/src/http/modules/ngx_http_ssl_module.c
@@ -101,7 +101,7 @@ static ngx_command_t ngx_http_ssl_commands[] = {
NULL },
{ ngx_string("ssl_verify_client"),
- NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_FLAG,
+ NGX_HTTP_MAIN_CONF|NGX_HTTP_SRV_CONF|NGX_CONF_TAKE1,
ngx_conf_set_enum_slot,
NGX_HTTP_SRV_CONF_OFFSET,
offsetof(ngx_http_ssl_srv_conf_t, verify),
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 0739c0044..c1fab3092 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -4397,7 +4397,7 @@ ngx_http_core_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
if (ngx_strncmp(value[i].data, "max=", 4) == 0) {
max = ngx_atoi(value[i].data + 4, value[i].len - 4);
- if (max == NGX_ERROR) {
+ if (max <= 0) {
goto failed;
}
diff --git a/src/mail/ngx_mail_proxy_module.c b/src/mail/ngx_mail_proxy_module.c
index a7c4b7e48..298e8d96a 100644
--- a/src/mail/ngx_mail_proxy_module.c
+++ b/src/mail/ngx_mail_proxy_module.c
@@ -60,7 +60,7 @@ static ngx_command_t ngx_mail_proxy_commands[] = {
NULL },
{ ngx_string("proxy_pass_error_message"),
- NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_TAKE1,
+ NGX_MAIL_MAIN_CONF|NGX_MAIL_SRV_CONF|NGX_CONF_FLAG,
ngx_conf_set_flag_slot,
NGX_MAIL_SRV_CONF_OFFSET,
offsetof(ngx_mail_proxy_conf_t, pass_error_message),