Mercurial > hg > nginx
comparison src/http/ngx_http_file_cache.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 | 49a1382b249b |
children | b3b8c66bd520 |
comparison
equal
deleted
inserted
replaced
2715:a5845475a903 | 2716:d5896f6608e8 |
---|---|
52 if (ocache) { | 52 if (ocache) { |
53 if (ngx_strcmp(cache->path->name.data, ocache->path->name.data) != 0) { | 53 if (ngx_strcmp(cache->path->name.data, ocache->path->name.data) != 0) { |
54 ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0, | 54 ngx_log_error(NGX_LOG_EMERG, shm_zone->shm.log, 0, |
55 "cache \"%V\" uses the \"%V\" cache path " | 55 "cache \"%V\" uses the \"%V\" cache path " |
56 "while previously it used the \"%V\" cache path", | 56 "while previously it used the \"%V\" cache path", |
57 &shm_zone->name, &cache->path->name, | 57 &shm_zone->shm.name, &cache->path->name, |
58 &ocache->path->name); | 58 &ocache->path->name); |
59 | 59 |
60 return NGX_ERROR; | 60 return NGX_ERROR; |
61 } | 61 } |
62 | 62 |
110 | 110 |
111 cache->bsize = ngx_fs_bsize(cache->path->name.data); | 111 cache->bsize = ngx_fs_bsize(cache->path->name.data); |
112 | 112 |
113 cache->max_size /= cache->bsize; | 113 cache->max_size /= cache->bsize; |
114 | 114 |
115 len = sizeof(" in cache keys zone \"\"") + shm_zone->name.len; | 115 len = sizeof(" in cache keys zone \"\"") + shm_zone->shm.name.len; |
116 | 116 |
117 cache->shpool->log_ctx = ngx_slab_alloc(cache->shpool, len); | 117 cache->shpool->log_ctx = ngx_slab_alloc(cache->shpool, len); |
118 if (cache->shpool->log_ctx == NULL) { | 118 if (cache->shpool->log_ctx == NULL) { |
119 return NGX_ERROR; | 119 return NGX_ERROR; |
120 } | 120 } |
121 | 121 |
122 ngx_sprintf(cache->shpool->log_ctx, " in cache keys zone \"%V\"%Z", | 122 ngx_sprintf(cache->shpool->log_ctx, " in cache keys zone \"%V\"%Z", |
123 &shm_zone->name); | 123 &shm_zone->shm.name); |
124 | 124 |
125 return NGX_OK; | 125 return NGX_OK; |
126 } | 126 } |
127 | 127 |
128 | 128 |
1397 name.data = value[i].data + 10; | 1397 name.data = value[i].data + 10; |
1398 | 1398 |
1399 p = (u_char *) ngx_strchr(name.data, ':'); | 1399 p = (u_char *) ngx_strchr(name.data, ':'); |
1400 | 1400 |
1401 if (p) { | 1401 if (p) { |
1402 *p = '\0'; | |
1403 | |
1402 name.len = p - name.data; | 1404 name.len = p - name.data; |
1403 | 1405 |
1404 p++; | 1406 p++; |
1405 | 1407 |
1406 s.len = value[i].data + value[i].len - p; | 1408 s.len = value[i].data + value[i].len - p; |