Skip to content

Commit

Permalink
Modules compatibility: upstream config field.
Browse files Browse the repository at this point in the history
It is to be used to track version of an upstream configuration used for
request processing.
  • Loading branch information
mdounin committed Sep 29, 2016
1 parent e900019 commit 7797fb0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/http/ngx_http_upstream_round_robin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/http/ngx_http_upstream_round_robin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/stream/ngx_stream_upstream_round_robin.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ ngx_stream_upstream_init_round_robin_peer(ngx_stream_session_t *s,

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

n = rrp->peers->number;

Expand Down Expand Up @@ -391,6 +392,7 @@ ngx_stream_upstream_create_round_robin_peer(ngx_stream_session_t *s,

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

if (rrp->peers->number <= 8 * sizeof(uintptr_t)) {
rrp->tried = &rrp->data;
Expand Down
1 change: 1 addition & 0 deletions src/stream/ngx_stream_upstream_round_robin.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7797fb0

Please sign in to comment.