diff --git a/dev/flags/flags.c b/dev/flags/flags.c index 6bac4c908..f5c147869 100644 --- a/dev/flags/flags.c +++ b/dev/flags/flags.c @@ -186,7 +186,7 @@ void show_endp_flags(unsigned int f) SHOW_FLAG(f, SE_FL_APPLET_NEED_CONN); SHOW_FLAG(f, SE_FL_HAVE_NO_DATA); - SHOW_FLAG(f, SE_FL_WANT_GET); + SHOW_FLAG(f, SE_FL_WILL_CONSUME); SHOW_FLAG(f, SE_FL_WAIT_DATA); SHOW_FLAG(f, SE_FL_KILL_CONN); SHOW_FLAG(f, SE_FL_WAIT_FOR_HS); diff --git a/include/haproxy/conn_stream-t.h b/include/haproxy/conn_stream-t.h index 601018a7f..ab6463761 100644 --- a/include/haproxy/conn_stream-t.h +++ b/include/haproxy/conn_stream-t.h @@ -72,8 +72,8 @@ enum se_flags { */ SE_FL_WAIT_FOR_HS = 0x00200000, /* This stream is waiting for handhskae */ SE_FL_KILL_CONN = 0x00400000, /* must kill the connection when the CS closes */ - SE_FL_WAIT_DATA = 0x00800000, /* CS waits for more outgoing data to send */ - SE_FL_WANT_GET = 0x01000000, /* CS would like to get some data from the buffer */ + SE_FL_WAIT_DATA = 0x00800000, /* stream endpoint cannot work without more data from the stream's output */ + SE_FL_WILL_CONSUME = 0x01000000, /* stream endpoint is interested in consuming more data */ SE_FL_HAVE_NO_DATA = 0x02000000, /* the endpoint has no more data to deliver to the stream */ SE_FL_APP_MASK = 0x02e00000, /* Mask for flags set by the app layer */ /* unused 0x04000000,*/ diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h index 6317e06d5..82f533ac7 100644 --- a/include/haproxy/conn_stream.h +++ b/include/haproxy/conn_stream.h @@ -382,25 +382,25 @@ static inline int cs_tx_blocked(const struct stconn *cs) /* Returns non-zero if the stream connector's endpoint is ready to transmit */ static inline int cs_tx_endp_ready(const struct stconn *cs) { - return sc_ep_test(cs, SE_FL_WANT_GET); + return sc_ep_test(cs, SE_FL_WILL_CONSUME); } /* Report that a stream connector wants to get some data from the output buffer */ static inline void cs_want_get(struct stconn *cs) { - sc_ep_set(cs, SE_FL_WANT_GET); + sc_ep_set(cs, SE_FL_WILL_CONSUME); } /* Report that a stream connector failed to get some data from the output buffer */ static inline void cs_cant_get(struct stconn *cs) { - sc_ep_set(cs, SE_FL_WANT_GET | SE_FL_WAIT_DATA); + sc_ep_set(cs, SE_FL_WILL_CONSUME | SE_FL_WAIT_DATA); } /* Report that a stream connector doesn't want to get data from the output buffer */ static inline void cs_stop_get(struct stconn *cs) { - sc_ep_clr(cs, SE_FL_WANT_GET); + sc_ep_clr(cs, SE_FL_WILL_CONSUME); } #endif /* _HAPROXY_CONN_STREAM_H */