[nginx] Modules compatibility: removed dependencies on NGX_STREAM_SSL.

Maxim Dounin mdounin at mdounin.ru
Mon Oct 10 16:51:53 UTC 2016


details:   http://hg.nginx.org/nginx/rev/f41c2530dd17
branches:  
changeset: 6736:f41c2530dd17
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Mon Oct 10 18:44:17 2016 +0300
description:
Modules compatibility: removed dependencies on NGX_STREAM_SSL.

External structures are now identical regardless of stream SSL module
compiled in or not.

diffstat:

 src/stream/ngx_stream.c                      |  2 --
 src/stream/ngx_stream.h                      |  8 --------
 src/stream/ngx_stream_upstream.h             |  2 --
 src/stream/ngx_stream_upstream_round_robin.h |  2 --
 4 files changed, 0 insertions(+), 14 deletions(-)

diffs (88 lines):

diff --git a/src/stream/ngx_stream.c b/src/stream/ngx_stream.c
--- a/src/stream/ngx_stream.c
+++ b/src/stream/ngx_stream.c
@@ -293,14 +293,12 @@ ngx_stream_init_phases(ngx_conf_t *cf, n
         return NGX_ERROR;
     }
 
-#if (NGX_STREAM_SSL)
     if (ngx_array_init(&cmcf->phases[NGX_STREAM_SSL_PHASE].handlers,
                        cf->pool, 1, sizeof(ngx_stream_handler_pt))
         != NGX_OK)
     {
         return NGX_ERROR;
     }
-#endif
 
     if (ngx_array_init(&cmcf->phases[NGX_STREAM_PREREAD_PHASE].handlers,
                        cf->pool, 1, sizeof(ngx_stream_handler_pt))
diff --git a/src/stream/ngx_stream.h b/src/stream/ngx_stream.h
--- a/src/stream/ngx_stream.h
+++ b/src/stream/ngx_stream.h
@@ -49,9 +49,7 @@ typedef struct {
 
     unsigned                       bind:1;
     unsigned                       wildcard:1;
-#if (NGX_STREAM_SSL)
     unsigned                       ssl:1;
-#endif
 #if (NGX_HAVE_INET6)
     unsigned                       ipv6only:1;
 #endif
@@ -71,9 +69,7 @@ typedef struct {
 typedef struct {
     ngx_stream_conf_ctx_t         *ctx;
     ngx_str_t                      addr_text;
-#if (NGX_STREAM_SSL)
     unsigned                       ssl:1;
-#endif
     unsigned                       proxy_protocol:1;
 } ngx_stream_addr_conf_t;
 
@@ -117,9 +113,7 @@ typedef enum {
     NGX_STREAM_POST_ACCEPT_PHASE = 0,
     NGX_STREAM_PREACCESS_PHASE,
     NGX_STREAM_ACCESS_PHASE,
-#if (NGX_STREAM_SSL)
     NGX_STREAM_SSL_PHASE,
-#endif
     NGX_STREAM_PREREAD_PHASE,
     NGX_STREAM_CONTENT_PHASE,
     NGX_STREAM_LOG_PHASE
@@ -223,9 +217,7 @@ struct ngx_stream_session_s {
     ngx_int_t                      phase_handler;
     ngx_uint_t                     status;
 
-#if (NGX_STREAM_SSL)
     unsigned                       ssl:1;
-#endif
 
     unsigned                       stat_processing:1;
 
diff --git a/src/stream/ngx_stream_upstream.h b/src/stream/ngx_stream_upstream.h
--- a/src/stream/ngx_stream_upstream.h
+++ b/src/stream/ngx_stream_upstream.h
@@ -126,9 +126,7 @@ typedef struct {
     time_t                             start_sec;
     ngx_uint_t                         responses;
 
-#if (NGX_STREAM_SSL)
     ngx_str_t                          ssl_name;
-#endif
 
     ngx_stream_upstream_srv_conf_t    *upstream;
     ngx_stream_upstream_resolved_t    *resolved;
diff --git a/src/stream/ngx_stream_upstream_round_robin.h b/src/stream/ngx_stream_upstream_round_robin.h
--- a/src/stream/ngx_stream_upstream_round_robin.h
+++ b/src/stream/ngx_stream_upstream_round_robin.h
@@ -40,10 +40,8 @@ struct ngx_stream_upstream_rr_peer_s {
 
     ngx_uint_t                       down;
 
-#if (NGX_STREAM_SSL)
     void                            *ssl_session;
     int                              ssl_session_len;
-#endif
 
 #if (NGX_STREAM_UPSTREAM_ZONE)
     ngx_atomic_t                     lock;



More information about the nginx-devel mailing list