Modules compatibility: removed dependencies on NGX_STREAM_SSL.

External structures are now identical regardless of stream SSL module
compiled in or not.
This commit is contained in:
Maxim Dounin 2016-10-10 18:44:17 +03:00
parent 8fd8c32ccf
commit 78f91756cd
4 changed files with 0 additions and 14 deletions

View File

@ -293,14 +293,12 @@ ngx_stream_init_phases(ngx_conf_t *cf, ngx_stream_core_main_conf_t *cmcf)
return NGX_ERROR; return NGX_ERROR;
} }
#if (NGX_STREAM_SSL)
if (ngx_array_init(&cmcf->phases[NGX_STREAM_SSL_PHASE].handlers, if (ngx_array_init(&cmcf->phases[NGX_STREAM_SSL_PHASE].handlers,
cf->pool, 1, sizeof(ngx_stream_handler_pt)) cf->pool, 1, sizeof(ngx_stream_handler_pt))
!= NGX_OK) != NGX_OK)
{ {
return NGX_ERROR; return NGX_ERROR;
} }
#endif
if (ngx_array_init(&cmcf->phases[NGX_STREAM_PREREAD_PHASE].handlers, if (ngx_array_init(&cmcf->phases[NGX_STREAM_PREREAD_PHASE].handlers,
cf->pool, 1, sizeof(ngx_stream_handler_pt)) cf->pool, 1, sizeof(ngx_stream_handler_pt))

View File

@ -49,9 +49,7 @@ typedef struct {
unsigned bind:1; unsigned bind:1;
unsigned wildcard:1; unsigned wildcard:1;
#if (NGX_STREAM_SSL)
unsigned ssl:1; unsigned ssl:1;
#endif
#if (NGX_HAVE_INET6) #if (NGX_HAVE_INET6)
unsigned ipv6only:1; unsigned ipv6only:1;
#endif #endif
@ -71,9 +69,7 @@ typedef struct {
typedef struct { typedef struct {
ngx_stream_conf_ctx_t *ctx; ngx_stream_conf_ctx_t *ctx;
ngx_str_t addr_text; ngx_str_t addr_text;
#if (NGX_STREAM_SSL)
unsigned ssl:1; unsigned ssl:1;
#endif
unsigned proxy_protocol:1; unsigned proxy_protocol:1;
} ngx_stream_addr_conf_t; } ngx_stream_addr_conf_t;
@ -117,9 +113,7 @@ typedef enum {
NGX_STREAM_POST_ACCEPT_PHASE = 0, NGX_STREAM_POST_ACCEPT_PHASE = 0,
NGX_STREAM_PREACCESS_PHASE, NGX_STREAM_PREACCESS_PHASE,
NGX_STREAM_ACCESS_PHASE, NGX_STREAM_ACCESS_PHASE,
#if (NGX_STREAM_SSL)
NGX_STREAM_SSL_PHASE, NGX_STREAM_SSL_PHASE,
#endif
NGX_STREAM_PREREAD_PHASE, NGX_STREAM_PREREAD_PHASE,
NGX_STREAM_CONTENT_PHASE, NGX_STREAM_CONTENT_PHASE,
NGX_STREAM_LOG_PHASE NGX_STREAM_LOG_PHASE
@ -223,9 +217,7 @@ struct ngx_stream_session_s {
ngx_int_t phase_handler; ngx_int_t phase_handler;
ngx_uint_t status; ngx_uint_t status;
#if (NGX_STREAM_SSL)
unsigned ssl:1; unsigned ssl:1;
#endif
unsigned stat_processing:1; unsigned stat_processing:1;

View File

@ -126,9 +126,7 @@ typedef struct {
time_t start_sec; time_t start_sec;
ngx_uint_t responses; ngx_uint_t responses;
#if (NGX_STREAM_SSL)
ngx_str_t ssl_name; ngx_str_t ssl_name;
#endif
ngx_stream_upstream_srv_conf_t *upstream; ngx_stream_upstream_srv_conf_t *upstream;
ngx_stream_upstream_resolved_t *resolved; ngx_stream_upstream_resolved_t *resolved;

View File

@ -40,10 +40,8 @@ struct ngx_stream_upstream_rr_peer_s {
ngx_uint_t down; ngx_uint_t down;
#if (NGX_STREAM_SSL)
void *ssl_session; void *ssl_session;
int ssl_session_len; int ssl_session_len;
#endif
#if (NGX_STREAM_UPSTREAM_ZONE) #if (NGX_STREAM_UPSTREAM_ZONE)
ngx_atomic_t lock; ngx_atomic_t lock;