Mercurial > hg > nginx
changeset 3017:c466605d9426
test cache path levels while reconfiguration
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 10 Aug 2009 13:18:40 +0000 |
parents | d82993af1da0 |
children | 8fc7b94f647b |
files | src/http/ngx_http_file_cache.c |
diffstat | 1 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/ngx_http_file_cache.c Mon Aug 10 13:07:15 2009 +0000 +++ b/src/http/ngx_http_file_cache.c Mon Aug 10 13:18:40 2009 +0000 @@ -53,6 +53,7 @@ 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 @@ 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;