SHOW_FLAG(f, CO_FL_SOCK_WR_SH);
SHOW_FLAG(f, CO_FL_SOCK_RD_SH);
SHOW_FLAG(f, CO_FL_DATA_WR_SH);
- SHOW_FLAG(f, CO_FL_DATA_RD_SH);
SHOW_FLAG(f, CO_FL_ADDR_TO_SET);
SHOW_FLAG(f, CO_FL_ADDR_FROM_SET);
SHOW_FLAG(f, CO_FL_WAIT_ROOM);
fdtab[c->handle.fd].linger_risk = 0;
}
-static inline void conn_data_read0(struct connection *c)
-{
- c->flags |= CO_FL_DATA_RD_SH;
- __conn_data_stop_recv(c);
-}
-
static inline void conn_sock_shutw(struct connection *c)
{
c->flags |= CO_FL_SOCK_WR_SH;
/* detect sock->data read0 transition */
static inline int conn_data_read0_pending(struct connection *c)
{
- return (c->flags & (CO_FL_DATA_RD_SH | CO_FL_SOCK_RD_SH)) == CO_FL_SOCK_RD_SH;
+ return (c->flags & CO_FL_SOCK_RD_SH) != 0;
}
/* detect data->sock shutw transition */
/* unused : 0x00008000 */
/* flags used to remember what shutdown have been performed/reported */
- CO_FL_DATA_RD_SH = 0x00010000, /* DATA layer was notified about shutr/read0 */
+ /* unused : 0x00010000 */
CO_FL_DATA_WR_SH = 0x00020000, /* DATA layer asked for shutw */
CO_FL_SOCK_RD_SH = 0x00040000, /* SOCK layer was notified about shutr/read0 */
CO_FL_SOCK_WR_SH = 0x00080000, /* SOCK layer asked for shutw */
done = 0;
conn->xprt->rcv_buf(conn, check->bi, check->bi->size);
- if (conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_DATA_RD_SH)) {
+ if (conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH)) {
done = 1;
if ((conn->flags & CO_FL_ERROR) && !check->bi->i) {
/* Report network errors only if we got no other data. Otherwise
goto out_end_tcpcheck;
if (conn->xprt->rcv_buf(conn, check->bi, check->bi->size) <= 0) {
- if (conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_DATA_RD_SH)) {
+ if (conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH)) {
done = 1;
if ((conn->flags & CO_FL_ERROR) && !check->bi->i) {
/* Report network errors only if we got no other data. Otherwise
if (conn->flags & CO_FL_ERROR)
return;
- /* stop here if we reached the end of data */
- if (conn_data_read0_pending(conn))
- goto out_shutdown_r;
-
/* maybe we were called immediately after an asynchronous shutr */
if (ic->flags & CF_SHUTR)
return;
+ /* stop here if we reached the end of data */
+ if (conn_data_read0_pending(conn))
+ goto out_shutdown_r;
+
cur_read = 0;
if ((ic->flags & (CF_STREAMER | CF_STREAMER_FAST)) && !ic->buf->o &&
* that if such an event is not handled above in splice, it will be handled here by
* recv().
*/
- while (!(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_DATA_RD_SH | CO_FL_WAIT_ROOM | CO_FL_HANDSHAKE))) {
+ while (!(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_WAIT_ROOM | CO_FL_HANDSHAKE)) && !(ic->flags & CF_SHUTR)) {
max = channel_recv_max(ic);
if (!max) {
if (ic->flags & CF_AUTO_CLOSE)
channel_shutw_now(ic);
stream_sock_read0(si);
- conn_data_read0(conn);
return;
}