diff --git a/contrib/debug/flags.c b/contrib/debug/flags.c index 0989e3b9c..5898c44b5 100644 --- a/contrib/debug/flags.c +++ b/contrib/debug/flags.c @@ -122,10 +122,10 @@ void show_conn_flags(unsigned int f) SHOW_FLAG(f, CO_FL_XPRT_READY); SHOW_FLAG(f, CO_FL_CTRL_READY); SHOW_FLAG(f, CO_FL_CURR_WR_ENA); - SHOW_FLAG(f, CO_FL_DATA_WR_ENA); + SHOW_FLAG(f, CO_FL_XPRT_WR_ENA); SHOW_FLAG(f, CO_FL_SOCK_WR_ENA); SHOW_FLAG(f, CO_FL_CURR_RD_ENA); - SHOW_FLAG(f, CO_FL_DATA_RD_ENA); + SHOW_FLAG(f, CO_FL_XPRT_RD_ENA); SHOW_FLAG(f, CO_FL_SOCK_RD_ENA); if (f) { diff --git a/include/proto/connection.h b/include/proto/connection.h index 2ec2ef8b1..17b68dd9e 100644 --- a/include/proto/connection.h +++ b/include/proto/connection.h @@ -167,11 +167,11 @@ void conn_update_sock_polling(struct connection *c); /* Update polling on connection 's file descriptor depending on its current * state as reported in the connection's CO_FL_CURR_* flags, reports of EAGAIN - * in CO_FL_WAIT_*, and the data layer expectations indicated by CO_FL_DATA_*. + * in CO_FL_WAIT_*, and the upper layer expectations indicated by CO_FL_XPRT_*. * The connection flags are updated with the new flags at the end of the * operation. Polling is totally disabled if an error was reported. */ -void conn_update_data_polling(struct connection *c); +void conn_update_xprt_polling(struct connection *c); /* Refresh the connection's polling flags from its file descriptor status. * This should be called at the beginning of a connection handler. @@ -191,7 +191,7 @@ static inline void conn_refresh_polling_flags(struct connection *conn) } } -/* inspects c->flags and returns non-zero if DATA ENA changes from the CURR ENA +/* inspects c->flags and returns non-zero if XPRT ENA changes from the CURR ENA * or if the WAIT flags are set with their respective ENA flags. Additionally, * non-zero is also returned if an error was reported on the connection. This * function is used quite often and is inlined. In order to proceed optimally @@ -204,10 +204,10 @@ static inline void conn_refresh_polling_flags(struct connection *conn) * replace the last AND with a TEST in boolean conditions. This results in * checks that are done in 4-6 cycles and less than 30 bytes. */ -static inline unsigned int conn_data_polling_changes(const struct connection *c) +static inline unsigned int conn_xprt_polling_changes(const struct connection *c) { unsigned int f = c->flags; - f &= CO_FL_DATA_WR_ENA | CO_FL_DATA_RD_ENA | CO_FL_CURR_WR_ENA | + f &= CO_FL_XPRT_WR_ENA | CO_FL_XPRT_RD_ENA | CO_FL_CURR_WR_ENA | CO_FL_CURR_RD_ENA | CO_FL_ERROR; f = (f ^ (f << 1)) & (CO_FL_CURR_WR_ENA|CO_FL_CURR_RD_ENA); /* test C ^ D */ @@ -237,13 +237,13 @@ static inline unsigned int conn_sock_polling_changes(const struct connection *c) return f & (CO_FL_CURR_WR_ENA | CO_FL_CURR_RD_ENA | CO_FL_ERROR); } -/* Automatically updates polling on connection depending on the DATA flags +/* Automatically updates polling on connection depending on the XPRT flags * if no handshake is in progress. */ -static inline void conn_cond_update_data_polling(struct connection *c) +static inline void conn_cond_update_xprt_polling(struct connection *c) { - if (!(c->flags & CO_FL_POLL_SOCK) && conn_data_polling_changes(c)) - conn_update_data_polling(c); + if (!(c->flags & CO_FL_POLL_SOCK) && conn_xprt_polling_changes(c)) + conn_update_xprt_polling(c); } /* Automatically updates polling on connection depending on the SOCK flags @@ -262,12 +262,12 @@ static inline void conn_stop_polling(struct connection *c) { c->flags &= ~(CO_FL_CURR_RD_ENA | CO_FL_CURR_WR_ENA | CO_FL_SOCK_RD_ENA | CO_FL_SOCK_WR_ENA | - CO_FL_DATA_RD_ENA | CO_FL_DATA_WR_ENA); + CO_FL_XPRT_RD_ENA | CO_FL_XPRT_WR_ENA); if (conn_ctrl_ready(c)) fd_stop_both(c->handle.fd); } -/* Automatically update polling on connection depending on the DATA and +/* Automatically update polling on connection depending on the XPRT and * SOCK flags, and on whether a handshake is in progress or not. This may be * called at any moment when there is a doubt about the effectiveness of the * polling state, for instance when entering or leaving the handshake state. @@ -276,8 +276,8 @@ static inline void conn_cond_update_polling(struct connection *c) { if (unlikely(c->flags & CO_FL_ERROR)) conn_stop_polling(c); - else if (!(c->flags & CO_FL_POLL_SOCK) && conn_data_polling_changes(c)) - conn_update_data_polling(c); + else if (!(c->flags & CO_FL_POLL_SOCK) && conn_xprt_polling_changes(c)) + conn_update_xprt_polling(c); else if ((c->flags & CO_FL_POLL_SOCK) && conn_sock_polling_changes(c)) conn_update_sock_polling(c); } @@ -287,14 +287,14 @@ static inline void conn_cond_update_polling(struct connection *c) * to be used by handlers called by the connection handler. The other ones * may be used anywhere. */ -static inline void __conn_data_want_recv(struct connection *c) +static inline void __conn_xprt_want_recv(struct connection *c) { - c->flags |= CO_FL_DATA_RD_ENA; + c->flags |= CO_FL_XPRT_RD_ENA; } -static inline void __conn_data_stop_recv(struct connection *c) +static inline void __conn_xprt_stop_recv(struct connection *c) { - c->flags &= ~CO_FL_DATA_RD_ENA; + c->flags &= ~CO_FL_XPRT_RD_ENA; } /* this one is used only to stop speculative recv(). It doesn't stop it if the @@ -302,58 +302,58 @@ static inline void __conn_data_stop_recv(struct connection *c) * Since it might require the upper layer to re-enable reading, we'll return 1 * if we've really stopped something otherwise zero. */ -static inline int __conn_data_done_recv(struct connection *c) +static inline int __conn_xprt_done_recv(struct connection *c) { if (!conn_ctrl_ready(c) || !fd_recv_polled(c->handle.fd)) { - c->flags &= ~CO_FL_DATA_RD_ENA; + c->flags &= ~CO_FL_XPRT_RD_ENA; return 1; } return 0; } -static inline void __conn_data_want_send(struct connection *c) +static inline void __conn_xprt_want_send(struct connection *c) { - c->flags |= CO_FL_DATA_WR_ENA; + c->flags |= CO_FL_XPRT_WR_ENA; } -static inline void __conn_data_stop_send(struct connection *c) +static inline void __conn_xprt_stop_send(struct connection *c) { - c->flags &= ~CO_FL_DATA_WR_ENA; + c->flags &= ~CO_FL_XPRT_WR_ENA; } -static inline void __conn_data_stop_both(struct connection *c) +static inline void __conn_xprt_stop_both(struct connection *c) { - c->flags &= ~(CO_FL_DATA_WR_ENA | CO_FL_DATA_RD_ENA); + c->flags &= ~(CO_FL_XPRT_WR_ENA | CO_FL_XPRT_RD_ENA); } -static inline void conn_data_want_recv(struct connection *c) +static inline void conn_xprt_want_recv(struct connection *c) { - __conn_data_want_recv(c); - conn_cond_update_data_polling(c); + __conn_xprt_want_recv(c); + conn_cond_update_xprt_polling(c); } -static inline void conn_data_stop_recv(struct connection *c) +static inline void conn_xprt_stop_recv(struct connection *c) { - __conn_data_stop_recv(c); - conn_cond_update_data_polling(c); + __conn_xprt_stop_recv(c); + conn_cond_update_xprt_polling(c); } -static inline void conn_data_want_send(struct connection *c) +static inline void conn_xprt_want_send(struct connection *c) { - __conn_data_want_send(c); - conn_cond_update_data_polling(c); + __conn_xprt_want_send(c); + conn_cond_update_xprt_polling(c); } -static inline void conn_data_stop_send(struct connection *c) +static inline void conn_xprt_stop_send(struct connection *c) { - __conn_data_stop_send(c); - conn_cond_update_data_polling(c); + __conn_xprt_stop_send(c); + conn_cond_update_xprt_polling(c); } -static inline void conn_data_stop_both(struct connection *c) +static inline void conn_xprt_stop_both(struct connection *c) { - __conn_data_stop_both(c); - conn_cond_update_data_polling(c); + __conn_xprt_stop_both(c); + conn_cond_update_xprt_polling(c); } /***** Event manipulation primitives for use by handshake I/O callbacks *****/ @@ -436,18 +436,18 @@ static inline void conn_sock_shutw(struct connection *c) shutdown(c->handle.fd, SHUT_WR); } -static inline void conn_data_shutw(struct connection *c) +static inline void conn_xprt_shutw(struct connection *c) { - __conn_data_stop_send(c); + __conn_xprt_stop_send(c); /* clean data-layer shutdown */ if (c->xprt && c->xprt->shutw) c->xprt->shutw(c, 1); } -static inline void conn_data_shutw_hard(struct connection *c) +static inline void conn_xprt_shutw_hard(struct connection *c) { - __conn_data_stop_send(c); + __conn_xprt_stop_send(c); /* unclean data-layer shutdown */ if (c->xprt && c->xprt->shutw) @@ -455,7 +455,7 @@ static inline void conn_data_shutw_hard(struct connection *c) } /* detect sock->data read0 transition */ -static inline int conn_data_read0_pending(struct connection *c) +static inline int conn_xprt_read0_pending(struct connection *c) { return (c->flags & CO_FL_SOCK_RD_SH) != 0; } diff --git a/include/proto/stream_interface.h b/include/proto/stream_interface.h index 391d8714e..bafac026b 100644 --- a/include/proto/stream_interface.h +++ b/include/proto/stream_interface.h @@ -185,7 +185,7 @@ static inline void si_idle_conn(struct stream_interface *si, struct list *pool) LIST_ADD(pool, &conn->list); conn_attach(conn, si, &si_idle_conn_cb); - conn_data_want_recv(conn); + conn_xprt_want_recv(conn); } /* Attach connection to the stream interface . The stream interface @@ -363,7 +363,7 @@ static inline int si_connect(struct stream_interface *si) /* reuse the existing connection */ if (!channel_is_empty(si_oc(si))) { /* we'll have to send a request there. */ - conn_data_want_send(conn); + conn_xprt_want_send(conn); } /* the connection is established */ diff --git a/include/types/connection.h b/include/types/connection.h index 9e256958e..d6f9322f7 100644 --- a/include/types/connection.h +++ b/include/types/connection.h @@ -70,12 +70,12 @@ enum { /* Do not change these values without updating conn_*_poll_changes() ! */ CO_FL_SOCK_RD_ENA = 0x00000001, /* receiving handshakes is allowed */ - CO_FL_DATA_RD_ENA = 0x00000002, /* receiving data is allowed */ + CO_FL_XPRT_RD_ENA = 0x00000002, /* receiving data is allowed */ CO_FL_CURR_RD_ENA = 0x00000004, /* receiving is currently allowed */ /* unused : 0x00000008 */ CO_FL_SOCK_WR_ENA = 0x00000010, /* sending handshakes is desired */ - CO_FL_DATA_WR_ENA = 0x00000020, /* sending data is desired */ + CO_FL_XPRT_WR_ENA = 0x00000020, /* sending data is desired */ CO_FL_CURR_WR_ENA = 0x00000040, /* sending is currently desired */ /* unused : 0x00000080 */ diff --git a/src/checks.c b/src/checks.c index 48e2bb94b..b61f27ae3 100644 --- a/src/checks.c +++ b/src/checks.c @@ -713,7 +713,7 @@ static void event_srv_chk_w(struct connection *conn) if (retrieve_errno_from_socket(conn)) { chk_report_conn_err(check, errno, 0); - __conn_data_stop_both(conn); + __conn_xprt_stop_both(conn); goto out_wakeup; } @@ -738,7 +738,7 @@ static void event_srv_chk_w(struct connection *conn) conn->xprt->snd_buf(conn, check->bo, 0); if (conn->flags & CO_FL_ERROR) { chk_report_conn_err(check, errno, 0); - __conn_data_stop_both(conn); + __conn_xprt_stop_both(conn); goto out_wakeup; } if (check->bo->o) @@ -755,7 +755,7 @@ static void event_srv_chk_w(struct connection *conn) out_wakeup: task_wakeup(t, TASK_WOKEN_IO); out_nowake: - __conn_data_stop_send(conn); /* nothing more to write */ + __conn_xprt_stop_send(conn); /* nothing more to write */ } /* @@ -1327,8 +1327,8 @@ static void event_srv_chk_r(struct connection *conn) * range quickly. To avoid sending RSTs all the time, we first try to * drain pending data. */ - __conn_data_stop_both(conn); - conn_data_shutw(conn); + __conn_xprt_stop_both(conn); + conn_xprt_shutw(conn); /* OK, let's not stay here forever */ if (check->result == CHK_RES_FAILED) @@ -1338,7 +1338,7 @@ static void event_srv_chk_r(struct connection *conn) return; wait_more_data: - __conn_data_want_recv(conn); + __conn_xprt_want_recv(conn); } /* @@ -1367,10 +1367,10 @@ static int wake_srv_chk(struct connection *conn) */ chk_report_conn_err(check, errno, 0); - __conn_data_stop_both(conn); + __conn_xprt_stop_both(conn); task_wakeup(check->task, TASK_WOKEN_IO); } - else if (!(conn->flags & (CO_FL_DATA_RD_ENA|CO_FL_DATA_WR_ENA|CO_FL_HANDSHAKE))) { + else if (!(conn->flags & (CO_FL_XPRT_RD_ENA|CO_FL_XPRT_WR_ENA|CO_FL_HANDSHAKE))) { /* we may get here if only a connection probe was required : we * don't have any data to send nor anything expected in response, * so the completion of the connection establishment is enough. @@ -2095,7 +2095,7 @@ static struct task *process_chk_conn(struct task *t) } if (check->type) - conn_data_want_recv(conn); /* prepare for reading a possible reply */ + conn_xprt_want_recv(conn); /* prepare for reading a possible reply */ goto reschedule; @@ -2586,7 +2586,7 @@ static int tcpcheck_main(struct check *check) /* It's only the rules which will enable send/recv */ if (conn) - __conn_data_stop_both(conn); + __conn_xprt_stop_both(conn); while (1) { /* We have to try to flush the output buffer before reading, at @@ -2599,11 +2599,11 @@ static int tcpcheck_main(struct check *check) check->current_step->action != TCPCHK_ACT_SEND || check->current_step->string_len >= buffer_total_space(check->bo))) { - __conn_data_want_send(conn); + __conn_xprt_want_send(conn); if (conn->xprt->snd_buf(conn, check->bo, 0) <= 0) { if (conn->flags & CO_FL_ERROR) { chk_report_conn_err(check, errno, 0); - __conn_data_stop_both(conn); + __conn_xprt_stop_both(conn); goto out_end_tcpcheck; } break; @@ -2825,7 +2825,7 @@ static int tcpcheck_main(struct check *check) if (unlikely(check->result == CHK_RES_FAILED)) goto out_end_tcpcheck; - __conn_data_want_recv(conn); + __conn_xprt_want_recv(conn); if (conn->xprt->rcv_buf(conn, check->bi, check->bi->size) <= 0) { if (conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH)) { done = 1; @@ -2923,7 +2923,7 @@ static int tcpcheck_main(struct check *check) if (check->current_step->action == TCPCHK_ACT_EXPECT) goto tcpcheck_expect; - __conn_data_stop_recv(conn); + __conn_xprt_stop_recv(conn); } } else { @@ -2943,7 +2943,7 @@ static int tcpcheck_main(struct check *check) if (check->current_step->action == TCPCHK_ACT_EXPECT) goto tcpcheck_expect; - __conn_data_stop_recv(conn); + __conn_xprt_stop_recv(conn); } /* not matched but was supposed to => ERROR */ else { @@ -2977,11 +2977,11 @@ static int tcpcheck_main(struct check *check) /* warning, current_step may now point to the head */ if (check->bo->o) - __conn_data_want_send(conn); + __conn_xprt_want_send(conn); if (&check->current_step->list != head && check->current_step->action == TCPCHK_ACT_EXPECT) - __conn_data_want_recv(conn); + __conn_xprt_want_recv(conn); return retcode; out_end_tcpcheck: @@ -2995,7 +2995,7 @@ static int tcpcheck_main(struct check *check) if (check->result == CHK_RES_FAILED) conn->flags |= CO_FL_ERROR; - __conn_data_stop_both(conn); + __conn_xprt_stop_both(conn); return retcode; } diff --git a/src/connection.c b/src/connection.c index 54bbc0737..b3183b789 100644 --- a/src/connection.c +++ b/src/connection.c @@ -97,7 +97,7 @@ void conn_fd_handler(int fd) return; if (conn->xprt && fd_send_ready(fd) && - ((conn->flags & (CO_FL_DATA_WR_ENA|CO_FL_ERROR|CO_FL_HANDSHAKE)) == CO_FL_DATA_WR_ENA)) { + ((conn->flags & (CO_FL_XPRT_WR_ENA|CO_FL_ERROR|CO_FL_HANDSHAKE)) == CO_FL_XPRT_WR_ENA)) { /* force reporting of activity by clearing the previous flags : * we'll have at least ERROR or CONNECTED at the end of an I/O, * both of which will be detected below. @@ -111,7 +111,7 @@ void conn_fd_handler(int fd) * changes due to a quick unexpected close(). */ if (conn->xprt && fd_recv_ready(fd) && - ((conn->flags & (CO_FL_DATA_RD_ENA|CO_FL_WAIT_ROOM|CO_FL_ERROR|CO_FL_HANDSHAKE)) == CO_FL_DATA_RD_ENA)) { + ((conn->flags & (CO_FL_XPRT_RD_ENA|CO_FL_WAIT_ROOM|CO_FL_ERROR|CO_FL_HANDSHAKE)) == CO_FL_XPRT_RD_ENA)) { /* force reporting of activity by clearing the previous flags : * we'll have at least ERROR or CONNECTED at the end of an I/O, * both of which will be detected below. @@ -180,11 +180,11 @@ void conn_fd_handler(int fd) /* Update polling on connection 's file descriptor depending on its current * state as reported in the connection's CO_FL_CURR_* flags, reports of EAGAIN - * in CO_FL_WAIT_*, and the data layer expectations indicated by CO_FL_DATA_*. + * in CO_FL_WAIT_*, and the data layer expectations indicated by CO_FL_XPRT_*. * The connection flags are updated with the new flags at the end of the * operation. Polling is totally disabled if an error was reported. */ -void conn_update_data_polling(struct connection *c) +void conn_update_xprt_polling(struct connection *c) { unsigned int f = c->flags; @@ -192,21 +192,21 @@ void conn_update_data_polling(struct connection *c) return; /* update read status if needed */ - if (unlikely((f & (CO_FL_CURR_RD_ENA|CO_FL_DATA_RD_ENA)) == CO_FL_DATA_RD_ENA)) { + if (unlikely((f & (CO_FL_CURR_RD_ENA|CO_FL_XPRT_RD_ENA)) == CO_FL_XPRT_RD_ENA)) { fd_want_recv(c->handle.fd); f |= CO_FL_CURR_RD_ENA; } - else if (unlikely((f & (CO_FL_CURR_RD_ENA|CO_FL_DATA_RD_ENA)) == CO_FL_CURR_RD_ENA)) { + else if (unlikely((f & (CO_FL_CURR_RD_ENA|CO_FL_XPRT_RD_ENA)) == CO_FL_CURR_RD_ENA)) { fd_stop_recv(c->handle.fd); f &= ~CO_FL_CURR_RD_ENA; } /* update write status if needed */ - if (unlikely((f & (CO_FL_CURR_WR_ENA|CO_FL_DATA_WR_ENA)) == CO_FL_DATA_WR_ENA)) { + if (unlikely((f & (CO_FL_CURR_WR_ENA|CO_FL_XPRT_WR_ENA)) == CO_FL_XPRT_WR_ENA)) { fd_want_send(c->handle.fd); f |= CO_FL_CURR_WR_ENA; } - else if (unlikely((f & (CO_FL_CURR_WR_ENA|CO_FL_DATA_WR_ENA)) == CO_FL_CURR_WR_ENA)) { + else if (unlikely((f & (CO_FL_CURR_WR_ENA|CO_FL_XPRT_WR_ENA)) == CO_FL_CURR_WR_ENA)) { fd_stop_send(c->handle.fd); f &= ~CO_FL_CURR_WR_ENA; } @@ -322,7 +322,7 @@ int conn_sock_drain(struct connection *conn) /* disable draining if we were called and have no drain function */ if (!conn->ctrl->drain) { - __conn_data_stop_recv(conn); + __conn_xprt_stop_recv(conn); return 0; } diff --git a/src/proto_tcp.c b/src/proto_tcp.c index fdb897e3e..ff800c822 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -562,7 +562,7 @@ int tcp_connect_server(struct connection *conn, int data, int delack) } if (data) - conn_data_want_send(conn); /* prepare to send data if any */ + conn_xprt_want_send(conn); /* prepare to send data if any */ return SF_ERR_NONE; /* connection is OK */ } diff --git a/src/proto_uxst.c b/src/proto_uxst.c index 80ba8cceb..207bb00d2 100644 --- a/src/proto_uxst.c +++ b/src/proto_uxst.c @@ -574,7 +574,7 @@ static int uxst_connect_server(struct connection *conn, int data, int delack) } if (data) - conn_data_want_send(conn); /* prepare to send data if any */ + conn_xprt_want_send(conn); /* prepare to send data if any */ return SF_ERR_NONE; /* connection is OK */ } diff --git a/src/session.c b/src/session.c index 79318b7d1..e5167c98b 100644 --- a/src/session.c +++ b/src/session.c @@ -147,7 +147,7 @@ int session_accept_fd(struct listener *l, int cfd, struct sockaddr_storage *addr conn_sock_want_recv(cli_conn); } - conn_data_want_recv(cli_conn); + conn_xprt_want_recv(cli_conn); if (conn_xprt_init(cli_conn) < 0) goto out_free_conn; diff --git a/src/stream.c b/src/stream.c index aae0d331f..880327b68 100644 --- a/src/stream.c +++ b/src/stream.c @@ -255,7 +255,7 @@ struct stream *stream_new(struct session *sess, enum obj_type *origin) /* finish initialization of the accepted file descriptor */ if (conn) - conn_data_want_recv(conn); + conn_xprt_want_recv(conn); else if (appctx) si_applet_want_get(&s->si[0]); diff --git a/src/stream_interface.c b/src/stream_interface.c index eaf4e4594..28af07e87 100644 --- a/src/stream_interface.c +++ b/src/stream_interface.c @@ -378,7 +378,7 @@ int conn_si_send_proxy(struct connection *conn, unsigned int flag) * data layer has a pending write, we'll also set MSG_MORE. */ ret = conn_sock_send(conn, trash.str + ret + conn->send_proxy_ofs, -conn->send_proxy_ofs, - (conn->flags & CO_FL_DATA_WR_ENA) ? MSG_MORE : 0); + (conn->flags & CO_FL_XPRT_WR_ENA) ? MSG_MORE : 0); if (ret < 0) goto out_error; @@ -589,15 +589,15 @@ static int si_conn_wake_cb(struct connection *conn) * was done above (eg: maybe some buffers got emptied). */ if (channel_is_empty(oc)) - __conn_data_stop_send(conn); + __conn_xprt_stop_send(conn); if (si->flags & SI_FL_WAIT_ROOM) { - __conn_data_stop_recv(conn); + __conn_xprt_stop_recv(conn); } else if ((ic->flags & (CF_SHUTR|CF_READ_PARTIAL|CF_DONT_READ)) == CF_READ_PARTIAL && channel_may_recv(ic)) { - __conn_data_want_recv(conn); + __conn_xprt_want_recv(conn); } return 0; } @@ -761,20 +761,20 @@ void stream_int_update_conn(struct stream_interface *si) if (!(ic->flags & CF_SHUTR)) { /* Read not closed */ if ((ic->flags & CF_DONT_READ) || !channel_may_recv(ic)) - __conn_data_stop_recv(conn); + __conn_xprt_stop_recv(conn); else - __conn_data_want_recv(conn); + __conn_xprt_want_recv(conn); } if (!(oc->flags & CF_SHUTW)) { /* Write not closed */ if (channel_is_empty(oc)) - __conn_data_stop_send(conn); + __conn_xprt_stop_send(conn); else - __conn_data_want_send(conn); + __conn_xprt_want_send(conn); } - conn_cond_update_data_polling(conn); + conn_cond_update_xprt_polling(conn); } /* @@ -813,7 +813,7 @@ static void stream_int_shutr_conn(struct stream_interface *si) } else if (conn->ctrl) { /* we want the caller to disable polling on this FD */ - conn_data_stop_recv(conn); + conn_xprt_stop_recv(conn); } } @@ -856,11 +856,11 @@ static void stream_int_shutw_conn(struct stream_interface *si) } else if (si->flags & SI_FL_NOLINGER) { /* unclean data-layer shutdown */ - conn_data_shutw_hard(conn); + conn_xprt_shutw_hard(conn); } else { /* clean data-layer shutdown */ - conn_data_shutw(conn); + conn_xprt_shutw(conn); /* If the stream interface is configured to disable half-open * connections, we'll skip the shutdown(), but only if the @@ -923,14 +923,14 @@ static void stream_int_chk_rcv_conn(struct stream_interface *si) /* stop reading */ if (!(ic->flags & CF_DONT_READ)) /* full */ si->flags |= SI_FL_WAIT_ROOM; - __conn_data_stop_recv(conn); + __conn_xprt_stop_recv(conn); } else { /* (re)start reading */ si->flags &= ~SI_FL_WAIT_ROOM; - __conn_data_want_recv(conn); + __conn_xprt_want_recv(conn); } - conn_cond_update_data_polling(conn); + conn_cond_update_xprt_polling(conn); } @@ -957,7 +957,7 @@ static void stream_int_chk_snd_conn(struct stream_interface *si) !(si->flags & SI_FL_WAIT_DATA)) /* not waiting for data */ return; - if (conn->flags & CO_FL_DATA_WR_ENA) { + if (conn->flags & CO_FL_XPRT_WR_ENA) { /* already subscribed to write notifications, will be called * anyway, so let's avoid calling it especially if the reader * is not ready. @@ -969,13 +969,13 @@ static void stream_int_chk_snd_conn(struct stream_interface *si) * the polling flags to ensure we properly detect changes. */ conn_refresh_polling_flags(conn); - __conn_data_want_send(conn); + __conn_xprt_want_send(conn); if (!(conn->flags & (CO_FL_HANDSHAKE|CO_FL_WAIT_L4_CONN|CO_FL_WAIT_L6_CONN))) { si_conn_send(conn); if (conn->flags & CO_FL_ERROR) { /* Write error on the file descriptor */ - __conn_data_stop_both(conn); + __conn_xprt_stop_both(conn); si->flags |= SI_FL_ERR; goto out_wakeup; } @@ -990,7 +990,7 @@ static void stream_int_chk_snd_conn(struct stream_interface *si) * ->o limit was reached. Maybe we just wrote the last * chunk and need to close. */ - __conn_data_stop_send(conn); + __conn_xprt_stop_send(conn); if (((oc->flags & (CF_SHUTW|CF_AUTO_CLOSE|CF_SHUTW_NOW)) == (CF_AUTO_CLOSE|CF_SHUTW_NOW)) && (si->state == SI_ST_EST)) { @@ -1006,7 +1006,7 @@ static void stream_int_chk_snd_conn(struct stream_interface *si) /* Otherwise there are remaining data to be sent in the buffer, * which means we have to poll before doing so. */ - __conn_data_want_send(conn); + __conn_xprt_want_send(conn); si->flags &= ~SI_FL_WAIT_DATA; if (!tick_isset(oc->wex)) oc->wex = tick_add_ifset(now_ms, oc->wto); @@ -1075,7 +1075,7 @@ static void si_conn_recv_cb(struct connection *conn) return; /* stop here if we reached the end of data */ - if (conn_data_read0_pending(conn)) + if (conn_xprt_read0_pending(conn)) goto out_shutdown_r; cur_read = 0; @@ -1129,7 +1129,7 @@ static void si_conn_recv_cb(struct connection *conn) ic->flags |= CF_READ_PARTIAL; } - if (conn_data_read0_pending(conn)) + if (conn_xprt_read0_pending(conn)) goto out_shutdown_r; if (conn->flags & CO_FL_ERROR) @@ -1140,7 +1140,7 @@ static void si_conn_recv_cb(struct connection *conn) * could soon be full. Let's stop before needing to poll. */ si->flags |= SI_FL_WAIT_ROOM; - __conn_data_stop_recv(conn); + __conn_xprt_stop_recv(conn); } /* splice not possible (anymore), let's go on on standard copy */ @@ -1197,7 +1197,7 @@ static void si_conn_recv_cb(struct connection *conn) } if ((ic->flags & CF_READ_DONTWAIT) || --read_poll <= 0) { - if (__conn_data_done_recv(conn)) + if (__conn_xprt_done_recv(conn)) si->flags |= SI_FL_WAIT_ROOM; break; } @@ -1265,7 +1265,7 @@ static void si_conn_recv_cb(struct connection *conn) if (conn->flags & CO_FL_ERROR) return; - if (conn_data_read0_pending(conn)) + if (conn_xprt_read0_pending(conn)) /* connection closed */ goto out_shutdown_r; @@ -1334,12 +1334,12 @@ void stream_sock_read0(struct stream_interface *si) if (si->flags & SI_FL_NOHALF) { /* we want to immediately forward this close to the write side */ /* force flag on ssl to keep stream in cache */ - conn_data_shutw_hard(conn); + conn_xprt_shutw_hard(conn); goto do_close; } /* otherwise that's just a normal read shutdown */ - __conn_data_stop_recv(conn); + __conn_xprt_stop_recv(conn); return; do_close: