mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 07:07:04 +02:00
CLEANUP: stconn: rename SE_FL_WANT_GET to SE_FL_WILL_CONSUME
This flag indicates the that stream endpoint is willing to consume output data from the stream. Its new name makes this more explicit. The function names will be updated accordingly, which will remove the disturbing "get" everywhere.
This commit is contained in:
parent
15252cd9c0
commit
79cf6e1f15
@ -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);
|
||||
|
@ -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,*/
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user