Welcome! Log In Create A New Profile

Advanced

[nginx] Upstream: introduced u->upstream.

Maxim Dounin
September 22, 2016 04:12PM
details: http://hg.nginx.org/nginx/rev/edcd9303a4d3
branches:
changeset: 6703:edcd9303a4d3
user: Maxim Dounin <mdounin@mdounin.ru>
date: Thu Sep 22 19:32:26 2016 +0300
description:
Upstream: introduced u->upstream.

It holds upstream{} block configuration, including ones selected via
run-time lookup using variables.

diffstat:

src/http/ngx_http_upstream.c | 2 ++
src/http/ngx_http_upstream.h | 1 +
src/stream/ngx_stream_proxy_module.c | 2 ++
src/stream/ngx_stream_upstream.h | 1 +
4 files changed, 6 insertions(+), 0 deletions(-)

diffs (46 lines):

diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c
+++ b/src/http/ngx_http_upstream.c
@@ -748,6 +748,8 @@ found:
return;
}

+ u->upstream = uscf;
+
#if (NGX_HTTP_SSL)
u->ssl_name = uscf->host;
#endif
diff --git a/src/http/ngx_http_upstream.h b/src/http/ngx_http_upstream.h
--- a/src/http/ngx_http_upstream.h
+++ b/src/http/ngx_http_upstream.h
@@ -313,6 +313,7 @@ struct ngx_http_upstream_s {
ngx_chain_writer_ctx_t writer;

ngx_http_upstream_conf_t *conf;
+ ngx_http_upstream_srv_conf_t *upstream;
#if (NGX_HTTP_CACHE)
ngx_array_t *caches;
#endif
diff --git a/src/stream/ngx_stream_proxy_module.c b/src/stream/ngx_stream_proxy_module.c
--- a/src/stream/ngx_stream_proxy_module.c
+++ b/src/stream/ngx_stream_proxy_module.c
@@ -521,6 +521,8 @@ found:
return;
}

+ u->upstream = uscf;
+
#if (NGX_STREAM_SSL)
u->ssl_name = uscf->host;
#endif
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
@@ -124,6 +124,7 @@ typedef struct {
ngx_str_t ssl_name;
#endif

+ ngx_stream_upstream_srv_conf_t *upstream;
ngx_stream_upstream_resolved_t *resolved;
ngx_stream_upstream_state_t *state;
unsigned connected:1;

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Upstream: introduced u->upstream.

Maxim Dounin 631 September 22, 2016 04:12PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 135
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready