Mercurial > hg > nginx
comparison src/http/ngx_http_file_cache.c @ 3017:c466605d9426
test cache path levels while reconfiguration
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 10 Aug 2009 13:18:40 +0000 |
parents | 0998606fbfd4 |
children | 8fc7b94f647b |
comparison
equal
deleted
inserted
replaced
3016:d82993af1da0 | 3017:c466605d9426 |
---|---|
51 ngx_http_file_cache_init(ngx_shm_zone_t *shm_zone, void *data) | 51 ngx_http_file_cache_init(ngx_shm_zone_t *shm_zone, void *data) |
52 { | 52 { |
53 ngx_http_file_cache_t *ocache = data; | 53 ngx_http_file_cache_t *ocache = data; |
54 | 54 |
55 size_t len; | 55 size_t len; |
56 ngx_uint_t n; | |
56 ngx_http_file_cache_t *cache; | 57 ngx_http_file_cache_t *cache; |
57 | 58 |
58 cache = shm_zone->data; | 59 cache = shm_zone->data; |
59 | 60 |
60 if (ocache) { | 61 if (ocache) { |
64 "while previously it used the \"%V\" cache path", | 65 "while previously it used the \"%V\" cache path", |
65 &shm_zone->shm.name, &cache->path->name, | 66 &shm_zone->shm.name, &cache->path->name, |
66 &ocache->path->name); | 67 &ocache->path->name); |
67 | 68 |
68 return NGX_ERROR; | 69 return NGX_ERROR; |
70 } | |
71 | |
72 for (n = 0; n < 3; n++) { | |
73 if (cache->path->level[n] != ocache->path->level[n]) { | |
74 ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0, | |
75 "cache \"%V\" had previously different levels", | |
76 &shm_zone->shm.name); | |
77 return NGX_ERROR; | |
78 } | |
69 } | 79 } |
70 | 80 |
71 cache->sh = ocache->sh; | 81 cache->sh = ocache->sh; |
72 | 82 |
73 cache->shpool = ocache->shpool; | 83 cache->shpool = ocache->shpool; |