diff src/core/ngx_conf_file.h @ 4985:a0599b56e748

Reopening log files code moved to a separate function. The code refactored in a way to call custom handler that can do appropriate cleanup work (if any), like flushing buffers, finishing compress streams, finalizing connections to log daemon, etc..
author Valentin Bartenev <vbart@nginx.com>
date Sun, 23 Dec 2012 15:36:52 +0000
parents 6e46016ea276
children 23a186e8ca45
line wrap: on
line diff
--- a/src/core/ngx_conf_file.h
+++ b/src/core/ngx_conf_file.h
@@ -91,17 +91,8 @@ struct ngx_open_file_s {
     ngx_fd_t              fd;
     ngx_str_t             name;
 
-    u_char               *buffer;
-    u_char               *pos;
-    u_char               *last;
-
-#if 0
-    /* e.g. append mode, error_log */
-    ngx_uint_t            flags;
-    /* e.g. reopen db file */
-    ngx_uint_t          (*handler)(void *data, ngx_open_file_t *file);
+    void                (*flush)(ngx_open_file_t *file, ngx_log_t *log);
     void                 *data;
-#endif
 };