diff src/http/modules/ngx_http_limit_zone_module.c @ 2716:d5896f6608e8

move zone name from ngx_shm_zone_t to ngx_shm_t to use Win32 shared memory
author Igor Sysoev <igor@sysoev.ru>
date Thu, 16 Apr 2009 19:25:09 +0000
parents 038dc63b657a
children b3b8c66bd520
line wrap: on
line diff
--- a/src/http/modules/ngx_http_limit_zone_module.c
+++ b/src/http/modules/ngx_http_limit_zone_module.c
@@ -191,7 +191,7 @@ ngx_http_limit_zone_handler(ngx_http_req
 
                 ngx_log_error(NGX_LOG_ERR, r->connection->log, 0,
                               "limiting connections by zone \"%V\"",
-                              &lzcf->shm_zone->name);
+                              &lzcf->shm_zone->shm.name);
 
                 return NGX_HTTP_SERVICE_UNAVAILABLE;
             }
@@ -328,7 +328,7 @@ ngx_http_limit_zone_init_zone(ngx_shm_zo
             ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0,
                           "limit_zone \"%V\" uses the \"%V\" variable "
                           "while previously it used the \"%V\" variable",
-                          &shm_zone->name, &ctx->var, &octx->var);
+                          &shm_zone->shm.name, &ctx->var, &octx->var);
             return NGX_ERROR;
         }
 
@@ -352,14 +352,15 @@ ngx_http_limit_zone_init_zone(ngx_shm_zo
     ngx_rbtree_init(ctx->rbtree, sentinel,
                     ngx_http_limit_zone_rbtree_insert_value);
 
-    len = sizeof(" in limit_zone \"\"") + shm_zone->name.len;
+    len = sizeof(" in limit_zone \"\"") + shm_zone->shm.name.len;
 
     shpool->log_ctx = ngx_slab_alloc(shpool, len);
     if (shpool->log_ctx == NULL) {
         return NGX_ERROR;
     }
 
-    ngx_sprintf(shpool->log_ctx, " in limit_zone \"%V\"%Z", &shm_zone->name);
+    ngx_sprintf(shpool->log_ctx, " in limit_zone \"%V\"%Z",
+                &shm_zone->shm.name);
 
     return NGX_OK;
 }