[nginx] Modules compatibility: down flag promoted to a bitmask.

Ruslan Ermilov ru at nginx.com
Fri Sep 22 19:50:49 UTC 2017


details:   http://hg.nginx.org/nginx/rev/5a3ab1b5804b
branches:  
changeset: 7112:5a3ab1b5804b
user:      Ruslan Ermilov <ru at nginx.com>
date:      Fri Sep 22 22:49:42 2017 +0300
description:
Modules compatibility: down flag promoted to a bitmask.

It is to be used as a bitmask with various bits set/reset when appropriate.
63b8b157b776 made a similar change to ngx_http_upstream_rr_peer_t.down and
ngx_stream_upstream_rr_peer_t.down.

diffstat:

 src/http/ngx_http_upstream.h     |  2 +-
 src/stream/ngx_stream_upstream.h |  2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 6d1f3bb72b07 -r 5a3ab1b5804b src/http/ngx_http_upstream.h
--- a/src/http/ngx_http_upstream.h	Fri Sep 22 18:37:49 2017 +0300
+++ b/src/http/ngx_http_upstream.h	Fri Sep 22 22:49:42 2017 +0300
@@ -98,8 +98,8 @@ typedef struct {
     ngx_uint_t                       max_fails;
     time_t                           fail_timeout;
     ngx_msec_t                       slow_start;
+    ngx_uint_t                       down;
 
-    unsigned                         down:1;
     unsigned                         backup:1;
 
     NGX_COMPAT_BEGIN(6)
diff -r 6d1f3bb72b07 -r 5a3ab1b5804b src/stream/ngx_stream_upstream.h
--- a/src/stream/ngx_stream_upstream.h	Fri Sep 22 18:37:49 2017 +0300
+++ b/src/stream/ngx_stream_upstream.h	Fri Sep 22 22:49:42 2017 +0300
@@ -58,8 +58,8 @@ typedef struct {
     ngx_uint_t                         max_fails;
     time_t                             fail_timeout;
     ngx_msec_t                         slow_start;
+    ngx_uint_t                         down;
 
-    unsigned                           down:1;
     unsigned                           backup:1;
 
     NGX_COMPAT_BEGIN(4)


More information about the nginx-devel mailing list