comparison src/http/modules/ngx_http_limit_zone_module.c @ 2372:7148efbdd798

test duplicate limit_conn
author Igor Sysoev <igor@sysoev.ru>
date Mon, 08 Dec 2008 14:08:44 +0000
parents 4fc402c3ec73
children f4603d71f532
comparison
equal deleted inserted replaced
2371:b438ffe54e34 2372:7148efbdd798
460 ngx_http_limit_zone_conf_t *lzcf = conf; 460 ngx_http_limit_zone_conf_t *lzcf = conf;
461 461
462 ngx_int_t n; 462 ngx_int_t n;
463 ngx_str_t *value; 463 ngx_str_t *value;
464 464
465 if (lzcf->shm_zone) {
466 return "is duplicate";
467 }
468
465 value = cf->args->elts; 469 value = cf->args->elts;
466 470
467 lzcf->shm_zone = ngx_shared_memory_add(cf, &value[1], 0, 471 lzcf->shm_zone = ngx_shared_memory_add(cf, &value[1], 0,
468 &ngx_http_limit_zone_module); 472 &ngx_http_limit_zone_module);
469 if (lzcf->shm_zone == NULL) { 473 if (lzcf->shm_zone == NULL) {