return !!(cs_state_bit(state) & mask);
}
+/* Returns true if a connection is attached to the conn-stream <cs> and if this
+ * connection is ready.
+ */
+static inline int cs_conn_ready(struct conn_stream *cs)
+{
+ struct connection *conn = cs_conn(cs);
+
+ return conn && conn_ctrl_ready(conn) && conn_xprt_ready(conn);
+}
+
+
/* Returns the source address of the conn-stream and, if not set, fallbacks on
* the session for frontend CS and the server connection for the backend CS. It
* returns a const address on success or NULL on failure.
appctx->applet->release(appctx);
}
-/* Returns true if a connection is attached to the stream interface <si> and
- * if this connection is ready.
- */
-static inline int si_conn_ready(struct stream_interface *si)
-{
- struct connection *conn = cs_conn(si->cs);
-
- return conn && conn_ctrl_ready(conn) && conn_xprt_ready(conn);
-}
-
/* Returns non-zero if the stream interface's Rx path is blocked */
static inline int si_rx_blocked(const struct stream_interface *si)
{
/* only release our endpoint if we don't intend to reuse the
* connection.
*/
- if (!si_conn_ready(cs_si(s->csb))) {
+ if (!cs_conn_ready(s->csb)) {
s->srv_conn = NULL;
if (cs_reset_endp(s->csb) < 0) {
if (!s->conn_err_type)