diff src/core/ngx_file.h @ 276:c5c2b2883984 NGINX_0_5_8

nginx 0.5.8 *) Bugfix: a segmentation fault might occur if "client_body_in_file_only on" was used and a request body was small. *) Bugfix: a segmentation fault occurred if "client_body_in_file_only on" and "proxy_pass_request_body off" or "fastcgi_pass_request_body off" directives were used, and nginx switched to a next upstream. *) Bugfix: if the "proxy_buffering off" directive was used and a client connection was non-active, then the connection was closed after send timeout; bug appeared in 0.4.7. *) Bugfix: if the "epoll" method was used and a client closed a connection prematurely, then nginx closed the connection after a send timeout only. *) Bugfix: the "[alert] zero size buf" error when FastCGI server was used. *) Bugfixes in the "limit_zone" directive.
author Igor Sysoev <http://sysoev.ru>
date Fri, 19 Jan 2007 00:00:00 +0300
parents 29a6403156b0
children 704622b2528a
line wrap: on
line diff
--- a/src/core/ngx_file.h
+++ b/src/core/ngx_file.h
@@ -49,7 +49,7 @@ typedef struct {
     ngx_pool_t         *pool;
     char               *warn;
 
-    ngx_uint_t          mode;
+    ngx_uint_t          access;
 
     unsigned            log_level:8;
     unsigned            persistent:1;
@@ -58,25 +58,30 @@ typedef struct {
 
 typedef struct ngx_tree_ctx_s  ngx_tree_ctx_t;
 
-typedef ngx_int_t (*ngx_tree_init_handler_pt) (ngx_tree_ctx_t *ctx,
-    ngx_tree_ctx_t *prev);
+typedef ngx_int_t (*ngx_tree_init_handler_pt) (void *ctx, void *prev);
 typedef ngx_int_t (*ngx_tree_handler_pt) (ngx_tree_ctx_t *ctx, ngx_str_t *name);
 
 struct ngx_tree_ctx_s {
+    off_t                      size;
+    ngx_uint_t                 access;
+    time_t                     mtime;
+
     ngx_tree_init_handler_pt   init_handler;
     ngx_tree_handler_pt        file_handler;
     ngx_tree_handler_pt        pre_tree_handler;
     ngx_tree_handler_pt        post_tree_handler;
     ngx_tree_handler_pt        spec_handler;
+
     void                      *data;
-    size_t                     size;
+    size_t                     alloc;
+
     ngx_log_t                 *log;
 };
 
 
 ssize_t ngx_write_chain_to_temp_file(ngx_temp_file_t *tf, ngx_chain_t *chain);
 ngx_int_t ngx_create_temp_file(ngx_file_t *file, ngx_path_t *path,
-    ngx_pool_t *pool, ngx_uint_t persistent,ngx_uint_t mode);
+    ngx_pool_t *pool, ngx_uint_t persistent,ngx_uint_t access);
 void ngx_create_hashed_filename(ngx_file_t *file, ngx_path_t *path);
 ngx_int_t ngx_create_path(ngx_file_t *file, ngx_path_t *path);
 ngx_err_t ngx_create_full_path(u_char *dir, ngx_uint_t access);