Welcome! Log In Create A New Profile

Advanced

[nginx] Modules compatibility: upstream config field.

Maxim Dounin
September 29, 2016 01:28PM
details: http://hg.nginx.org/nginx/rev/fd5c2781460b
branches:
changeset: 6712:fd5c2781460b
user: Maxim Dounin <mdounin@mdounin.ru>
date: Thu Sep 29 18:06:04 2016 +0300
description:
Modules compatibility: upstream config field.

It is to be used to track version of an upstream configuration used for
request processing.

diffstat:

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

diffs (60 lines):

diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c
--- a/src/http/ngx_http_upstream_round_robin.c
+++ b/src/http/ngx_http_upstream_round_robin.c
@@ -260,6 +260,7 @@ ngx_http_upstream_init_round_robin_peer(

rrp->peers = us->peer.data;
rrp->current = NULL;
+ rrp->config = 0;

n = rrp->peers->number;

@@ -384,6 +385,7 @@ ngx_http_upstream_create_round_robin_pee

rrp->peers = peers;
rrp->current = NULL;
+ rrp->config = 0;

if (rrp->peers->number <= 8 * sizeof(uintptr_t)) {
rrp->tried = &rrp->data;
diff --git a/src/http/ngx_http_upstream_round_robin.h b/src/http/ngx_http_upstream_round_robin.h
--- a/src/http/ngx_http_upstream_round_robin.h
+++ b/src/http/ngx_http_upstream_round_robin.h
@@ -122,6 +122,7 @@ struct ngx_http_upstream_rr_peers_s {


typedef struct {
+ ngx_uint_t config;
ngx_http_upstream_rr_peers_t *peers;
ngx_http_upstream_rr_peer_t *current;
uintptr_t *tried;
diff --git a/src/stream/ngx_stream_upstream_round_robin.c b/src/stream/ngx_stream_upstream_round_robin.c
--- a/src/stream/ngx_stream_upstream_round_robin.c
+++ b/src/stream/ngx_stream_upstream_round_robin.c
@@ -265,6 +265,7 @@ ngx_stream_upstream_init_round_robin_pee

rrp->peers = us->peer.data;
rrp->current = NULL;
+ rrp->config = 0;

n = rrp->peers->number;

@@ -391,6 +392,7 @@ ngx_stream_upstream_create_round_robin_p

rrp->peers = peers;
rrp->current = NULL;
+ rrp->config = 0;

if (rrp->peers->number <= 8 * sizeof(uintptr_t)) {
rrp->tried = &rrp->data;
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
@@ -122,6 +122,7 @@ struct ngx_stream_upstream_rr_peers_s {


typedef struct {
+ ngx_uint_t config;
ngx_stream_upstream_rr_peers_t *peers;
ngx_stream_upstream_rr_peer_t *current;
uintptr_t *tried;

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

[nginx] Modules compatibility: upstream config field.

Maxim Dounin 336 September 29, 2016 01:28PM



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

Online Users

Guests: 157
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready