diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2009-08-10 13:18:40 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2009-08-10 13:18:40 +0000 |
| commit | 3210b282f5595e257c42569c24233b42878a1d84 (patch) | |
| tree | ac461ab33acfc7575e5aa26fe0e251d64cdff6f4 | |
| parent | 07b280a29f425d0da024cc9ab2987dd23f792386 (diff) | |
| download | nginx-3210b282f5595e257c42569c24233b42878a1d84.tar.gz nginx-3210b282f5595e257c42569c24233b42878a1d84.tar.bz2 | |
test cache path levels while reconfiguration
Diffstat (limited to '')
| -rw-r--r-- | src/http/ngx_http_file_cache.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/http/ngx_http_file_cache.c b/src/http/ngx_http_file_cache.c index 8e908a1dc..5d90adc48 100644 --- a/src/http/ngx_http_file_cache.c +++ b/src/http/ngx_http_file_cache.c @@ -53,6 +53,7 @@ ngx_http_file_cache_init(ngx_shm_zone_t *shm_zone, void *data) ngx_http_file_cache_t *ocache = data; size_t len; + ngx_uint_t n; ngx_http_file_cache_t *cache; cache = shm_zone->data; @@ -68,6 +69,15 @@ ngx_http_file_cache_init(ngx_shm_zone_t *shm_zone, void *data) return NGX_ERROR; } + for (n = 0; n < 3; n++) { + if (cache->path->level[n] != ocache->path->level[n]) { + ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0, + "cache \"%V\" had previously different levels", + &shm_zone->shm.name); + return NGX_ERROR; + } + } + cache->sh = ocache->sh; cache->shpool = ocache->shpool; |
