]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: h2: new function h2c_error to mark an error on the connection
authorWilly Tarreau <w@1wt.eu>
Tue, 17 Oct 2017 06:00:59 +0000 (08:00 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 31 Oct 2017 17:12:14 +0000 (18:12 +0100)
This one sets the error code in h2c->errcode and changes the connection's
stat to H2_CS_ERROR.

src/mux_h2.c

index 370494d5bc7b0046d2303e9adbede7ec80a6e3c1..ff9df381cf58619fa2bc56eb9b9736b8b3344f21 100644 (file)
@@ -373,6 +373,13 @@ static inline int h2c_mux_busy(const struct h2c *h2c, const struct h2s *h2s)
        return 1;
 }
 
+/* marks an error on the connection */
+static inline void h2c_error(struct h2c *h2c, enum h2_err err)
+{
+       h2c->errcode = err;
+       h2c->st0 = H2_CS_ERROR;
+}
+
 
 /*********************************************************/
 /* functions below are I/O callbacks from the connection */