mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-05-06 09:48:00 +00:00
MINOR: stream-int/conn-stream: Move si_conn_ready() in the conn-stream scope
si_conn_ready() is renamed cs_conn_ready() and handle a conn-stream insted of a stream-interface. The function is now in cs_utils.h.
This commit is contained in:
parent
0a4dcb65ff
commit
e39a4dfdf0
@ -108,6 +108,17 @@ static inline int cs_state_in(enum cs_state state, enum cs_state_bit mask)
|
||||
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.
|
||||
|
@ -127,16 +127,6 @@ static inline void si_applet_release(struct stream_interface *si)
|
||||
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)
|
||||
{
|
||||
|
@ -2753,7 +2753,7 @@ int pcli_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
|
||||
/* 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)
|
||||
|
Loading…
Reference in New Issue
Block a user