From e573380f247f4840dd27b40e76c587196a84f106 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 8 Sep 2005 14:36:09 +0000 Subject: nginx-0.1.45-RELEASE import *) Change: the "ssl_engine" directive was canceled in the ngx_http_ssl_module and now is introduced at global level. *) Bugfix: the responses with SSI subrequests did not transferred via SSL connection. *) Various bug fixes in the IMAP/POP3 proxy. --- src/core/nginx.c | 9 ++++++++- src/core/nginx.h | 2 +- src/core/ngx_conf_file.c | 8 +++++++- src/core/ngx_conf_file.h | 27 +++++++++++++++++++++++---- src/core/ngx_connection.c | 9 ++++++++- src/core/ngx_log.c | 8 +++++++- 6 files changed, 54 insertions(+), 9 deletions(-) (limited to 'src/core') diff --git a/src/core/nginx.c b/src/core/nginx.c index 78e3caa3c..10db55540 100644 --- a/src/core/nginx.c +++ b/src/core/nginx.c @@ -118,8 +118,14 @@ ngx_module_t ngx_core_module = { &ngx_core_module_ctx, /* module context */ ngx_core_commands, /* module directives */ NGX_CORE_MODULE, /* module type */ + NULL, /* init master */ NULL, /* init module */ - NULL /* init process */ + NULL, /* init process */ + NULL, /* init thread */ + NULL, /* exit thread */ + NULL, /* exit process */ + NULL, /* exit master */ + NGX_MODULE_V1_PADDING }; @@ -153,6 +159,7 @@ main(int argc, char *const *argv) return 1; } + /* STUB */ #if (NGX_OPENSSL) ngx_ssl_init(log); #endif diff --git a/src/core/nginx.h b/src/core/nginx.h index a24f88360..904c2ea38 100644 --- a/src/core/nginx.h +++ b/src/core/nginx.h @@ -8,7 +8,7 @@ #define _NGINX_H_INCLUDED_ -#define NGINX_VER "nginx/0.1.44" +#define NGINX_VER "nginx/0.1.45" #define NGINX_VAR "NGINX" #define NGX_NEWPID_EXT ".newbin" diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c index 1a66ea92a..a536bd69d 100644 --- a/src/core/ngx_conf_file.c +++ b/src/core/ngx_conf_file.c @@ -31,8 +31,14 @@ ngx_module_t ngx_conf_module = { NULL, /* module context */ ngx_conf_commands, /* module directives */ NGX_CONF_MODULE, /* module type */ + NULL, /* init master */ NULL, /* init module */ - NULL /* init process */ + NULL, /* init process */ + NULL, /* init thread */ + NULL, /* exit thread */ + NULL, /* exit process */ + NULL, /* exit master */ + NGX_MODULE_V1_PADDING }; diff --git a/src/core/ngx_conf_file.h b/src/core/ngx_conf_file.h index 1f4e72cee..483852fd2 100644 --- a/src/core/ngx_conf_file.h +++ b/src/core/ngx_conf_file.h @@ -65,8 +65,6 @@ #define NGX_CONF_BLOCK_DONE 2 #define NGX_CONF_FILE_DONE 3 -#define NGX_MODULE_V1 0, 0, 1, 0, 0 - #define NGX_CORE_MODULE 0x45524F43 /* "CORE" */ #define NGX_CONF_MODULE 0x464E4F43 /* "CONF" */ @@ -99,21 +97,42 @@ struct ngx_open_file_s { }; +#define NGX_MODULE_V1 0, 0, 1, 0, 0, 0, 0 +#define NGX_MODULE_V1_PADDING 0, 0, 0, 0, 0, 0, 0, 0 + struct ngx_module_s { ngx_uint_t ctx_index; ngx_uint_t index; ngx_uint_t version; + ngx_uint_t spare0; ngx_uint_t spare1; + ngx_uint_t spare2; + ngx_uint_t spare3; void *ctx; ngx_command_t *commands; ngx_uint_t type; + + ngx_int_t (*init_master)(ngx_log_t *log); + ngx_int_t (*init_module)(ngx_cycle_t *cycle); + ngx_int_t (*init_process)(ngx_cycle_t *cycle); -#if 0 ngx_int_t (*init_thread)(ngx_cycle_t *cycle); -#endif + ngx_int_t (*exit_thread)(ngx_cycle_t *cycle); + ngx_int_t (*exit_process)(ngx_cycle_t *cycle); + + ngx_int_t (*exit_master)(ngx_cycle_t *cycle); + + uintptr_t spare_hook0; + uintptr_t spare_hook1; + uintptr_t spare_hook2; + uintptr_t spare_hook3; + uintptr_t spare_hook4; + uintptr_t spare_hook5; + uintptr_t spare_hook6; + uintptr_t spare_hook7; }; diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index fe75264db..c423c05ee 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c @@ -67,6 +67,7 @@ ngx_set_inherited_sockets(ngx_cycle_t *cycle) ngx_listening_t *ls; struct sockaddr_in *sin; #if (NGX_HAVE_DEFERRED_ACCEPT && defined SO_ACCEPTFILTER) + ngx_err_t err; socklen_t aflen; struct accept_filter_arg af; #endif @@ -133,7 +134,13 @@ ngx_set_inherited_sockets(ngx_cycle_t *cycle) if (getsockopt(ls[i].fd, SOL_SOCKET, SO_ACCEPTFILTER, &af, &aflen) == -1) { - ngx_log_error(NGX_LOG_NOTICE, cycle->log, ngx_errno, + err = ngx_errno; + + if (err == NGX_EINVAL) { + continue; + } + + ngx_log_error(NGX_LOG_NOTICE, cycle->log, err, "getsockopt(SO_ACCEPTFILTER) for %V failed, ignored", &ls[i].addr_text); continue; diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c index efc62f93c..905c8a165 100644 --- a/src/core/ngx_log.c +++ b/src/core/ngx_log.c @@ -37,8 +37,14 @@ ngx_module_t ngx_errlog_module = { &ngx_errlog_module_ctx, /* module context */ ngx_errlog_commands, /* module directives */ NGX_CORE_MODULE, /* module type */ + NULL, /* init master */ NULL, /* init module */ - NULL /* init process */ + NULL, /* init process */ + NULL, /* init thread */ + NULL, /* exit thread */ + NULL, /* exit process */ + NULL, /* exit master */ + NGX_MODULE_V1_PADDING }; -- cgit v1.2.3