]> git.kaiwu.me - nginx.git/commitdiff
Modules compatibility: removed dependencies on NGX_STREAM_SSL.
authorMaxim Dounin <mdounin@mdounin.ru>
Mon, 10 Oct 2016 15:44:17 +0000 (18:44 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Mon, 10 Oct 2016 15:44:17 +0000 (18:44 +0300)
External structures are now identical regardless of stream SSL module
compiled in or not.

src/stream/ngx_stream.c
src/stream/ngx_stream.h
src/stream/ngx_stream_upstream.h
src/stream/ngx_stream_upstream_round_robin.h

index b982c1fee7796e00d6786597d7dc12863ac28083..4a394d75ea00952e316a025536cb03eaa7f66080 100644 (file)
@@ -293,14 +293,12 @@ ngx_stream_init_phases(ngx_conf_t *cf, ngx_stream_core_main_conf_t *cmcf)
         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))
index 15b96ff19212c75eed886db8a8ac886a5cc49079..9e4169c38186481eb9b99bbb6abcc3ce0169b299 100644 (file)
@@ -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;
 
index 5c99078a6f0037a67163134bc200f371037f782d..764a340e7c1240fde11d89e5327d3608195dda98 100644 (file)
@@ -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;
index 9e1afc5455ff36a5cf663f882a90cbcd54cda33b..35d9fce6ca9bbd873b64951872eb2d79866155a6 100644 (file)
@@ -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;