comparison src/core/ngx_file.c @ 1295:5383f5232364

proxy_store and fastcgi_store were changed, proxy_store_access and fastcgi_store_access were added
author Igor Sysoev <igor@sysoev.ru>
date Fri, 13 Jul 2007 08:30:34 +0000
parents 13a4ce6e7f1e
children 345d2095a6d5
comparison
equal deleted inserted replaced
1294:e888f8acdb46 1295:5383f5232364
301 u_char *p; 301 u_char *p;
302 ngx_str_t *value; 302 ngx_str_t *value;
303 ngx_uint_t i, right, shift, *access; 303 ngx_uint_t i, right, shift, *access;
304 304
305 access = (ngx_uint_t *) (confp + cmd->offset); 305 access = (ngx_uint_t *) (confp + cmd->offset);
306 306
307 if (*access != NGX_CONF_UNSET_UINT) { 307 if (*access != NGX_CONF_UNSET_UINT) {
308 return "is duplicate"; 308 return "is duplicate";
309 } 309 }
310 310
311 value = cf->args->elts; 311 value = cf->args->elts;
312 312
313 *access = 0600; 313 *access = 0600;
314 314
315 for (i = 1; i < cf->args->nelts; i++) { 315 for (i = 1; i < cf->args->nelts; i++) {
326 326
327 } else if (ngx_strncmp(p, "all:", sizeof("all:") - 1) == 0) { 327 } else if (ngx_strncmp(p, "all:", sizeof("all:") - 1) == 0) {
328 shift = 0; 328 shift = 0;
329 p += sizeof("all:") - 1; 329 p += sizeof("all:") - 1;
330 330
331 } else if (ngx_strncmp(p, "off", sizeof("off") - 1) == 0) {
332 *access = 0;
333 return NGX_CONF_OK;
334
335 } else { 331 } else {
336 goto invalid; 332 goto invalid;
337 } 333 }
338 334
339 if (ngx_strcmp(p, "rw") == 0) { 335 if (ngx_strcmp(p, "rw") == 0) {
346 goto invalid; 342 goto invalid;
347 } 343 }
348 344
349 *access |= right << shift; 345 *access |= right << shift;
350 } 346 }
351 347
352 return NGX_CONF_OK; 348 return NGX_CONF_OK;
353 349
354 invalid: 350 invalid:
355 351
356 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "invalid value \"%V\"", &value[i]); 352 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "invalid value \"%V\"", &value[i]);