changeset 552:43e02819c5cf NGINX_0_8_28

nginx 0.8.28 *) Bugfix: nginx could not be built with the --without-pcre parameter; the bug had appeared in 0.8.25.
author Igor Sysoev <http://sysoev.ru>
date Mon, 23 Nov 2009 00:00:00 +0300
parents 8af5b52635d0
children 63dde5a94756
files CHANGES CHANGES.ru src/core/nginx.h src/core/ngx_connection.c src/event/modules/ngx_poll_module.c src/event/modules/ngx_select_module.c src/event/modules/ngx_win32_select_module.c src/event/ngx_event_openssl.c src/http/modules/perl/nginx.pm src/http/ngx_http_variables.c src/http/ngx_http_variables.h src/os/unix/ngx_process.c src/os/unix/ngx_process_cycle.c src/os/unix/ngx_process_cycle.h
diffstat 14 files changed, 53 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,14 @@
 
+Changes with nginx 0.8.28                                        23 Nov 2009
+
+    *) Bugfix: nginx could not be built with the --without-pcre parameter; 
+       the bug had appeared in 0.8.25.
+
+
 Changes with nginx 0.8.27                                        17 Nov 2009
 
-    *) Bugfix: regular expressions did work in nginx/Windows; the bug had 
-       appeared in 0.8.25.
+    *) Bugfix: regular expressions did not work in nginx/Windows; the bug 
+       had appeared in 0.8.25.
 
 
 Changes with nginx 0.8.26                                        16 Nov 2009
--- a/CHANGES.ru
+++ b/CHANGES.ru
@@ -1,4 +1,10 @@
 
+Изменения в nginx 0.8.28                                          23.11.2009
+
+    *) Исправление: nginx не собирался с параметром --without-pcre; ошибка 
+       появилась в 0.8.25.
+
+
 Изменения в nginx 0.8.27                                          17.11.2009
 
     *) Исправление: регулярные выражения не работали в nginx/Windows; 
--- a/src/core/nginx.h
+++ b/src/core/nginx.h
@@ -8,8 +8,8 @@
 #define _NGINX_H_INCLUDED_
 
 
-#define nginx_version         8027
-#define NGINX_VERSION      "0.8.27"
+#define nginx_version         8028
+#define NGINX_VERSION      "0.8.28"
 #define NGINX_VER          "nginx/" NGINX_VERSION
 
 #define NGINX_VAR          "NGINX"
--- a/src/core/ngx_connection.c
+++ b/src/core/ngx_connection.c
@@ -634,7 +634,7 @@ ngx_close_listening_sockets(ngx_cycle_t 
 #if (NGX_HAVE_UNIX_DOMAIN)
 
         if (ls[i].sockaddr->sa_family == AF_UNIX
-            && ngx_process != NGX_PROCESS_WORKER
+            && ngx_process <= NGX_PROCESS_MASTER
             && ngx_new_binary == 0)
         {
             u_char *name = ls[i].addr_text.data + sizeof("unix:") - 1;
--- a/src/event/modules/ngx_poll_module.c
+++ b/src/event/modules/ngx_poll_module.c
@@ -72,7 +72,7 @@ ngx_poll_init(ngx_cycle_t *cycle, ngx_ms
         nevents = 0;
     }
 
-    if (ngx_process == NGX_PROCESS_WORKER
+    if (ngx_process >= NGX_PROCESS_WORKER
         || cycle->old_cycle == NULL
         || cycle->old_cycle->connection_n < cycle->connection_n)
     {
--- a/src/event/modules/ngx_select_module.c
+++ b/src/event/modules/ngx_select_module.c
@@ -81,7 +81,7 @@ ngx_select_init(ngx_cycle_t *cycle, ngx_
         nevents = 0;
     }
 
-    if (ngx_process == NGX_PROCESS_WORKER
+    if (ngx_process >= NGX_PROCESS_WORKER
         || cycle->old_cycle == NULL
         || cycle->old_cycle->connection_n < cycle->connection_n)
     {
--- a/src/event/modules/ngx_win32_select_module.c
+++ b/src/event/modules/ngx_win32_select_module.c
@@ -82,7 +82,7 @@ ngx_select_init(ngx_cycle_t *cycle, ngx_
         nevents = 0;
     }
 
-    if (ngx_process == NGX_PROCESS_WORKER
+    if (ngx_process >= NGX_PROCESS_WORKER
         || cycle->old_cycle == NULL
         || cycle->old_cycle->connection_n < cycle->connection_n)
     {
--- a/src/event/ngx_event_openssl.c
+++ b/src/event/ngx_event_openssl.c
@@ -1312,6 +1312,7 @@ ngx_ssl_connection_error(ngx_connection_
             || n == SSL_R_NO_SHARED_CIPHER                           /*  193 */
             || n == SSL_R_UNEXPECTED_MESSAGE                         /*  244 */
             || n == SSL_R_UNEXPECTED_RECORD                          /*  245 */
+            || n == SSL_R_UNKNOWN_PROTOCOL                           /*  252 */
             || n == SSL_R_WRONG_VERSION_NUMBER                       /*  267 */
             || n == SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC        /*  281 */
             || n == 1000 /* SSL_R_SSLV3_ALERT_CLOSE_NOTIFY */
--- a/src/http/modules/perl/nginx.pm
+++ b/src/http/modules/perl/nginx.pm
@@ -47,7 +47,7 @@ our @EXPORT = qw(
     HTTP_INSUFFICIENT_STORAGE
 );
 
-our $VERSION = '0.8.27';
+our $VERSION = '0.8.28';
 
 require XSLoader;
 XSLoader::load('nginx', $VERSION);
--- a/src/http/ngx_http_variables.c
+++ b/src/http/ngx_http_variables.c
@@ -1666,6 +1666,8 @@ ngx_http_variable_pid(ngx_http_request_t
 }
 
 
+#if (NGX_PCRE)
+
 static ngx_int_t
 ngx_http_variable_not_found(ngx_http_request_t *r, ngx_http_variable_value_t *v,
     uintptr_t data)
@@ -1816,6 +1818,8 @@ ngx_http_regex_exec(ngx_http_request_t *
     return NGX_OK;
 }
 
+#endif
+
 
 ngx_int_t
 ngx_http_variables_add_core_vars(ngx_conf_t *cf)
--- a/src/http/ngx_http_variables.h
+++ b/src/http/ngx_http_variables.h
@@ -41,21 +41,6 @@ struct ngx_http_variable_s {
 };
 
 
-typedef struct {
-    ngx_uint_t                    capture;
-    ngx_int_t                     index;
-} ngx_http_regex_variable_t;
-
-
-typedef struct {
-    ngx_regex_t                  *regex;
-    ngx_uint_t                    ncaptures;
-    ngx_http_regex_variable_t    *variables;
-    ngx_uint_t                    nvariables;
-    ngx_str_t                     name;
-} ngx_http_regex_t;
-
-
 ngx_http_variable_t *ngx_http_add_variable(ngx_conf_t *cf, ngx_str_t *name,
     ngx_uint_t flags);
 ngx_int_t ngx_http_get_variable_index(ngx_conf_t *cf, ngx_str_t *name);
@@ -74,11 +59,30 @@ ngx_int_t ngx_http_variable_unknown_head
 #define ngx_http_clear_variable(r, index) r->variables0[index].text.data = NULL;
 
 
+#if (NGX_PCRE)
+
+typedef struct {
+    ngx_uint_t                    capture;
+    ngx_int_t                     index;
+} ngx_http_regex_variable_t;
+
+
+typedef struct {
+    ngx_regex_t                  *regex;
+    ngx_uint_t                    ncaptures;
+    ngx_http_regex_variable_t    *variables;
+    ngx_uint_t                    nvariables;
+    ngx_str_t                     name;
+} ngx_http_regex_t;
+
+
 ngx_http_regex_t *ngx_http_regex_compile(ngx_conf_t *cf,
     ngx_regex_compile_t *rc);
 ngx_int_t ngx_http_regex_exec(ngx_http_request_t *r, ngx_http_regex_t *re,
     ngx_str_t *s);
 
+#endif
+
 
 ngx_int_t ngx_http_variables_add_core_vars(ngx_conf_t *cf);
 ngx_int_t ngx_http_variables_init_vars(ngx_conf_t *cf);
--- a/src/os/unix/ngx_process.c
+++ b/src/os/unix/ngx_process.c
@@ -388,6 +388,7 @@ ngx_signal_handler(int signo)
         break;
 
     case NGX_PROCESS_WORKER:
+    case NGX_PROCESS_HELPER:
         switch (signo) {
 
         case ngx_signal_value(NGX_NOACCEPT_SIGNAL):
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -714,6 +714,8 @@ ngx_worker_process_cycle(ngx_cycle_t *cy
     ngx_uint_t         i;
     ngx_connection_t  *c;
 
+    ngx_process = NGX_PROCESS_WORKER;
+
     ngx_worker_process_init(cycle, 1);
 
     ngx_setproctitle("worker process");
@@ -829,8 +831,6 @@ ngx_worker_process_init(ngx_cycle_t *cyc
     ngx_core_conf_t  *ccf;
     ngx_listening_t  *ls;
 
-    ngx_process = NGX_PROCESS_WORKER;
-
     if (ngx_set_environment(cycle, NULL) == NULL) {
         /* fatal */
         exit(2);
@@ -1289,6 +1289,8 @@ ngx_cache_manager_process_cycle(ngx_cycl
 
     cycle->connection_n = 512;
 
+    ngx_process = NGX_PROCESS_HELPER;
+
     ngx_worker_process_init(cycle, 0);
 
     ngx_close_listening_sockets(cycle);
--- a/src/os/unix/ngx_process_cycle.h
+++ b/src/os/unix/ngx_process_cycle.h
@@ -21,8 +21,9 @@
 
 #define NGX_PROCESS_SINGLE     0
 #define NGX_PROCESS_MASTER     1
-#define NGX_PROCESS_WORKER     2
-#define NGX_PROCESS_SIGNALLER  3
+#define NGX_PROCESS_SIGNALLER  2
+#define NGX_PROCESS_WORKER     3
+#define NGX_PROCESS_HELPER     4
 
 
 typedef struct {