CLEANUP: stconn: remove cs_tx_blocked() and cs_tx_endp_ready()
These ones were used exactly once and together, in sc_is_send_allowed().
No need to give them confusing names, instead let's just put the flags,
they're way more explicit, and drop the two functions.
diff --git a/include/haproxy/conn_stream.h b/include/haproxy/conn_stream.h
index 82f533a..7f15dff 100644
--- a/include/haproxy/conn_stream.h
+++ b/include/haproxy/conn_stream.h
@@ -373,18 +373,6 @@
sc->flags |= SC_FL_NEED_ROOM;
}
-/* Returns non-zero if the stream connector's Tx path is blocked */
-static inline int cs_tx_blocked(const struct stconn *cs)
-{
- return !!sc_ep_test(cs, SE_FL_WAIT_DATA);
-}
-
-/* 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_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)
{
diff --git a/include/haproxy/cs_utils.h b/include/haproxy/cs_utils.h
index b53602c..7efe60e 100644
--- a/include/haproxy/cs_utils.h
+++ b/include/haproxy/cs_utils.h
@@ -378,7 +378,7 @@
if (oc->flags & CF_SHUTW)
return 0;
- return cs_tx_endp_ready(sc) && !cs_tx_blocked(sc);
+ return (sc_ep_get(sc) & (SE_FL_WAIT_DATA|SE_FL_WILL_CONSUME)) == SE_FL_WILL_CONSUME;
}
#endif /* _HAPROXY_CS_UTILS_H */