MINOR: stream-int: Remove SI_FL_NOLINGER/NOHALF to rely on CS flags instead
Flags to disable lingering and half-close are now handled at the conn-stream
level. Thus SI_FL_NOLINGER and SI_FL_NOHALF stream-int flags are replaced by
CS_FL_NOLINGER and CS_FL_NOHALF conn-stream flags.
diff --git a/src/http_ana.c b/src/http_ana.c
index a1b6b1f..c1700f2 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -1112,7 +1112,7 @@
if (s->be->options & PR_O_ABRT_CLOSE) {
channel_auto_read(req);
if ((req->flags & (CF_SHUTR|CF_READ_NULL)) && !(txn->flags & TX_CON_WANT_TUN))
- cs_si(s->csb)->flags |= SI_FL_NOLINGER;
+ s->csb->flags |= CS_FL_NOLINGER;
channel_auto_close(req);
}
else if (s->txn->meth == HTTP_METH_POST) {
@@ -1358,7 +1358,7 @@
stream_inc_http_fail_ctr(s);
}
- si_b->flags |= SI_FL_NOLINGER;
+ s->csb->flags |= CS_FL_NOLINGER;
http_reply_and_close(s, txn->status, http_error_message(s));
if (!(s->flags & SF_ERR_MASK))
@@ -1388,7 +1388,7 @@
txn->status = 504;
stream_inc_http_fail_ctr(s);
- si_b->flags |= SI_FL_NOLINGER;
+ s->csb->flags |= CS_FL_NOLINGER;
http_reply_and_close(s, txn->status, http_error_message(s));
if (!(s->flags & SF_ERR_MASK))
@@ -1445,7 +1445,7 @@
txn->status = 502;
stream_inc_http_fail_ctr(s);
- si_b->flags |= SI_FL_NOLINGER;
+ s->csb->flags |= CS_FL_NOLINGER;
http_reply_and_close(s, txn->status, http_error_message(s));
if (!(s->flags & SF_ERR_MASK))
@@ -1740,7 +1740,7 @@
if (!(s->flags & SF_FINST_MASK))
s->flags |= SF_FINST_H;
- si_b->flags |= SI_FL_NOLINGER;
+ s->csb->flags |= CS_FL_NOLINGER;
DBG_TRACE_DEVEL("leaving on error",
STRM_EV_STRM_ANA|STRM_EV_HTTP_ANA|STRM_EV_HTTP_ERR, s, txn);
return 0;
@@ -2050,7 +2050,7 @@
return_prx_cond:
s->logs.t_data = -1; /* was not a valid response */
- cs_si(s->csb)->flags |= SI_FL_NOLINGER;
+ s->csb->flags |= CS_FL_NOLINGER;
if (!(s->flags & SF_ERR_MASK))
s->flags |= SF_ERR_PRXCOND;
@@ -4318,7 +4318,7 @@
/* if the server closes the connection, we want to immediately react
* and close the socket to save packets and syscalls.
*/
- cs_si(s->csb)->flags |= SI_FL_NOHALF;
+ s->csb->flags |= CS_FL_NOHALF;
/* In any case we've finished parsing the request so we must
* disable Nagle when sending data because 1) we're not going
@@ -4393,7 +4393,7 @@
http_msg_closed:
/* if we don't know whether the server will close, we need to hard close */
if (txn->rsp.flags & HTTP_MSGF_XFER_LEN)
- cs_si(s->csb)->flags |= SI_FL_NOLINGER; /* we want to close ASAP */
+ s->csb->flags |= CS_FL_NOLINGER; /* we want to close ASAP */
/* see above in MSG_DONE why we only do this in these states */
if (!(s->be->options & PR_O_ABRT_CLOSE))
channel_dont_read(chn);