# HG changeset patch # User Maxim Dounin # Date 1328456878 0 # Node ID 97995d63aa369b1120737f7dd4af53b7d77a896e # Parent 5c97978d2717650cdac611ca6576767a943acbee Merge of r4381, r4400: 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. The code for limit_conn is different in 1.0.x, conflict resolved manually. diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c --- a/src/http/modules/ngx_http_limit_req_module.c +++ b/src/http/modules/ngx_http_limit_req_module.c @@ -569,7 +569,9 @@ 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; + conf->burst = prev->burst; + conf->nodelay = prev->nodelay; } ngx_conf_merge_uint_value(conf->limit_log_level, prev->limit_log_level, diff --git a/src/http/modules/ngx_http_limit_zone_module.c b/src/http/modules/ngx_http_limit_zone_module.c --- a/src/http/modules/ngx_http_limit_zone_module.c +++ b/src/http/modules/ngx_http_limit_zone_module.c @@ -421,7 +421,8 @@ ngx_http_limit_zone_merge_conf(ngx_conf_ ngx_http_limit_zone_conf_t *conf = child; if (conf->shm_zone == NULL) { - *conf = *prev; + conf->shm_zone = prev->shm_zone; + conf->conn = prev->conn; } ngx_conf_merge_uint_value(conf->log_level, prev->log_level, NGX_LOG_ERR);