]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stconn: Add functions to set/clear SE_FL_EXP_NO_DATA flag from endpoint
authorChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Feb 2023 12:44:31 +0000 (13:44 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Thu, 23 Feb 2023 12:44:32 +0000 (13:44 +0100)
se_expect_data() and se_expect_no_data() should be used from the endpoint to
inform upper layer it expects data or not from the opposite endpoint.

include/haproxy/stconn.h

index 10395accd0984af50d7c724ee6298a9ff006ddf5..27e61071bef45cdc3ece09d56e7eaaa85336f925 100644 (file)
@@ -105,6 +105,16 @@ static inline void se_fl_set_error(struct sedesc *se)
                se_fl_set(se, SE_FL_ERR_PENDING);
 }
 
+static inline void se_expect_no_data(struct sedesc *se)
+{
+       se_fl_set(se, SE_FL_EXP_NO_DATA);
+}
+
+static inline void se_expect_data(struct sedesc *se)
+{
+       se_fl_clr(se, SE_FL_EXP_NO_DATA);
+}
+
 /* stream connector version */
 static forceinline void sc_ep_zero(struct stconn *sc)
 {