changeset 4380:7697412a0921

Fixed limit_conn_log_level/limit_req_log_level inheritance. The directives did not work if there were no limit_conn/limit_req specified on the same level.
author Valentin Bartenev <vbart@nginx.com>
date Sun, 25 Dec 2011 19:32:31 +0000
parents 4e2551a83291
children e9a0427f4139
files src/http/modules/ngx_http_limit_conn_module.c src/http/modules/ngx_http_limit_req_module.c
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/http/modules/ngx_http_limit_conn_module.c
+++ b/src/http/modules/ngx_http_limit_conn_module.c
@@ -483,7 +483,7 @@ ngx_http_limit_conn_merge_conf(ngx_conf_
     ngx_http_limit_conn_conf_t *conf = child;
 
     if (conf->limits.elts == NULL) {
-        *conf = *prev;
+        conf->limits = prev->limits;
     }
 
     ngx_conf_merge_uint_value(conf->log_level, prev->log_level, NGX_LOG_ERR);
--- a/src/http/modules/ngx_http_limit_req_module.c
+++ b/src/http/modules/ngx_http_limit_req_module.c
@@ -569,7 +569,7 @@ ngx_http_limit_req_merge_conf(ngx_conf_t
     ngx_http_limit_req_conf_t *conf = child;
 
     if (conf->shm_zone == NULL) {
-        *conf = *prev;
+        conf->shm_zone = prev->shm_zone;
     }
 
     ngx_conf_merge_uint_value(conf->limit_log_level, prev->limit_log_level,