]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: connection/debug: do not enforce !event_type on subscribe() anymore
authorWilly Tarreau <w@1wt.eu>
Thu, 5 Mar 2020 06:41:20 +0000 (07:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 5 Mar 2020 06:46:33 +0000 (07:46 +0100)
When building with DEBUG_STRICT, there are still some BUG_ON(events&event_type)
in the subscribe() code which are not welcome anymore since we explicitly
permit to wake the caller up on readiness. This causes some regtests to fail
since 2c1f37d353 ("OPTIM: mux-h1: subscribe rather than waking up at a few
other places") when built with this option.

No backport is needed, this is 2.2-dev.

src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/ssl_sock.c
src/xprt_handshake.c

index 6a7a13f927d76bc2246eb0bdd7d5a36d1eae0814..7254add05c8289ad345fcfcf12da2f5d4aeeb0b7 100644 (file)
@@ -3712,7 +3712,6 @@ static int fcgi_subscribe(struct conn_stream *cs, int event_type, struct wait_ev
        struct fcgi_conn *fconn = fstrm->fconn;
 
        BUG_ON(event_type & ~(SUB_RETRY_SEND|SUB_RETRY_RECV));
-       BUG_ON(fstrm->subs && fstrm->subs->events & event_type);
        BUG_ON(fstrm->subs && fstrm->subs != es);
 
        es->events |= event_type;
index a07654b4d660079c67f2c5c81966e47757bf055d..2e2dbf943505eb5f0d0b12ccb12f38e5a253acd1 100644 (file)
@@ -2587,7 +2587,6 @@ static int h1_subscribe(struct conn_stream *cs, int event_type, struct wait_even
                return -1;
 
        BUG_ON(event_type & ~(SUB_RETRY_SEND|SUB_RETRY_RECV));
-       BUG_ON(h1s->subs && h1s->subs->events & event_type);
        BUG_ON(h1s->subs && h1s->subs != es);
 
        es->events |= event_type;
index 478f3c4fcf2e205cd01f9cb09b9ba96bcec0326f..b8728970ba81ec20ffcd6af0c9da531ecc2859d9 100644 (file)
@@ -5611,7 +5611,6 @@ static int h2_subscribe(struct conn_stream *cs, int event_type, struct wait_even
        TRACE_ENTER(H2_EV_STRM_SEND|H2_EV_STRM_RECV, h2c->conn, h2s);
 
        BUG_ON(event_type & ~(SUB_RETRY_SEND|SUB_RETRY_RECV));
-       BUG_ON(h2s->subs && h2s->subs->events & event_type);
        BUG_ON(h2s->subs && h2s->subs != es);
 
        es->events |= event_type;
index efb6b0e0e1f72a17aabf7cb25543c83f862f80a7..2688117e5985cf7c5dc5c6c7ff720679a2de4d66 100644 (file)
@@ -6473,7 +6473,6 @@ static int ssl_subscribe(struct connection *conn, void *xprt_ctx, int event_type
                return -1;
 
        BUG_ON(event_type & ~(SUB_RETRY_SEND|SUB_RETRY_RECV));
-       BUG_ON(ctx->subs && ctx->subs->events & event_type);
        BUG_ON(ctx->subs && ctx->subs != es);
 
        ctx->subs = es;
index 89446af37fe884360b21f9a4e48d907099b20a0a..bfbd52237cec1e0fbeadcfbb4bda552caf0d4a88 100644 (file)
@@ -203,7 +203,6 @@ static int xprt_handshake_subscribe(struct connection *conn, void *xprt_ctx, int
        struct xprt_handshake_ctx *ctx = xprt_ctx;
 
        BUG_ON(event_type & ~(SUB_RETRY_SEND|SUB_RETRY_RECV));
-       BUG_ON(ctx->subs && ctx->subs->events & event_type);
        BUG_ON(ctx->subs && ctx->subs != es);
 
        ctx->subs = es;