From 7797fb04cdcffd5ffb760cb7fd9ebdab7b74fde2 Mon Sep 17 00:00:00 2001 From: Maxim Dounin Date: Thu, 29 Sep 2016 18:06:04 +0300 Subject: Modules compatibility: upstream config field. It is to be used to track version of an upstream configuration used for request processing. --- src/http/ngx_http_upstream_round_robin.c | 2 ++ src/http/ngx_http_upstream_round_robin.h | 1 + 2 files changed, 3 insertions(+) (limited to 'src/http') diff --git a/src/http/ngx_http_upstream_round_robin.c b/src/http/ngx_http_upstream_round_robin.c index 501584d37..0137bf61a 100644 --- 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(ngx_http_request_t *r, 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_peer(ngx_http_request_t *r, 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 index d0f163197..6323abfa3 100644 --- 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; -- cgit