diff options
author | Igor Sysoev <igor@sysoev.ru> | 2009-03-27 17:00:42 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2009-03-27 17:00:42 +0000 |
commit | a2c8d9a0a88ab60f0c477621e7a6ce51c7dfe54e (patch) | |
tree | 2a04d8e0def77b60449b7843e35941edd3287c22 /src/http/modules/ngx_http_limit_req_module.c | |
parent | 04fe40023ad6fae43bffeebbfee5af374ce8e777 (diff) | |
download | nginx-a2c8d9a0a88ab60f0c477621e7a6ce51c7dfe54e.tar.gz nginx-a2c8d9a0a88ab60f0c477621e7a6ce51c7dfe54e.zip |
improve ngx_slab_alloc() error logging
Diffstat (limited to 'src/http/modules/ngx_http_limit_req_module.c')
-rw-r--r-- | src/http/modules/ngx_http_limit_req_module.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_limit_req_module.c b/src/http/modules/ngx_http_limit_req_module.c index dac62ed15..36787b090 100644 --- a/src/http/modules/ngx_http_limit_req_module.c +++ b/src/http/modules/ngx_http_limit_req_module.c @@ -457,6 +457,7 @@ ngx_http_limit_req_init_zone(ngx_shm_zone_t *shm_zone, void *data) { ngx_http_limit_req_ctx_t *octx = data; + size_t len; ngx_rbtree_node_t *sentinel; ngx_http_limit_req_ctx_t *ctx; @@ -500,6 +501,16 @@ ngx_http_limit_req_init_zone(ngx_shm_zone_t *shm_zone, void *data) ngx_queue_init(ctx->queue); + len = sizeof(" in limit_req zone \"\"") + shm_zone->name.len; + + ctx->shpool->log_ctx = ngx_slab_alloc(ctx->shpool, len); + if (ctx->shpool->log_ctx == NULL) { + return NGX_ERROR; + } + + ngx_sprintf(ctx->shpool->log_ctx, " in limit_req zone \"%V\"%Z", + &shm_zone->name); + return NGX_OK; } |