diff options
author | Valentin Bartenev <vbart@nginx.com> | 2011-12-25 19:32:31 +0000 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2011-12-25 19:32:31 +0000 |
commit | 39f01e526fc30fc22c2a938c77701dbb4b51ccf2 (patch) | |
tree | 7c511ad53cf13f8173ced894187e88757d772ebb | |
parent | 197312f3a03de12d8183872cbb702bdf20e8cd04 (diff) | |
download | nginx-39f01e526fc30fc22c2a938c77701dbb4b51ccf2.tar.gz nginx-39f01e526fc30fc22c2a938c77701dbb4b51ccf2.zip |
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.
-rw-r--r-- | src/http/modules/ngx_http_limit_conn_module.c | 2 | ||||
-rw-r--r-- | src/http/modules/ngx_http_limit_req_module.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/http/modules/ngx_http_limit_conn_module.c b/src/http/modules/ngx_http_limit_conn_module.c index a84d54d7e..40f05a22e 100644 --- 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_t *cf, void *parent, void *child) 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); diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c index 718fae8e2..865f7666d 100644 --- 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 *cf, void *parent, void *child) 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, |