Mercurial > hg > nginx
comparison src/http/modules/ngx_http_limit_req_module.c @ 4416:8156a9bfc044
Limit req: error messages fixed.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Mon, 30 Jan 2012 09:02:29 +0000 |
parents | d620f497c50f |
children | 9e9d2e06f933 |
comparison
equal
deleted
inserted
replaced
4415:30eff7580d0c | 4416:8156a9bfc044 |
---|---|
689 return NGX_CONF_ERROR; | 689 return NGX_CONF_ERROR; |
690 } | 690 } |
691 | 691 |
692 if (ctx == NULL) { | 692 if (ctx == NULL) { |
693 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 693 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
694 "no variable is defined for limit_req_zone \"%V\"", | 694 "no variable is defined for %V \"%V\"", |
695 &cmd->name); | 695 &cmd->name, &name); |
696 return NGX_CONF_ERROR; | 696 return NGX_CONF_ERROR; |
697 } | 697 } |
698 | 698 |
699 ctx->rate = rate * 1000 / scale; | 699 ctx->rate = rate * 1000 / scale; |
700 | 700 |
706 | 706 |
707 if (shm_zone->data) { | 707 if (shm_zone->data) { |
708 ctx = shm_zone->data; | 708 ctx = shm_zone->data; |
709 | 709 |
710 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, | 710 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, |
711 "limit_req_zone \"%V\" is already bound to variable \"%V\"", | 711 "%V \"%V\" is already bound to variable \"%V\"", |
712 &value[1], &ctx->var); | 712 &cmd->name, &name, &ctx->var); |
713 return NGX_CONF_ERROR; | 713 return NGX_CONF_ERROR; |
714 } | 714 } |
715 | 715 |
716 shm_zone->init = ngx_http_limit_req_init_zone; | 716 shm_zone->init = ngx_http_limit_req_init_zone; |
717 shm_zone->data = ctx; | 717 shm_zone->data = ctx; |