printf("0\n");
return;
}
- SHOW_FLAG(f, CS_FL_INDEP_STR);
- SHOW_FLAG(f, CS_FL_DONT_WAKE);
- SHOW_FLAG(f, CS_FL_NOLINGER);
- SHOW_FLAG(f, CS_FL_NOHALF);
- SHOW_FLAG(f, CS_FL_ISBACK);
+ SHOW_FLAG(f, SC_FL_INDEP_STR);
+ SHOW_FLAG(f, SC_FL_DONT_WAKE);
+ SHOW_FLAG(f, SC_FL_NOLINGER);
+ SHOW_FLAG(f, SC_FL_NOHALF);
+ SHOW_FLAG(f, SC_FL_ISBACK);
if (f) {
printf("EXTRA(0x%08x)", f);
};
/* stconn flags */
-enum {
- CS_FL_NONE = 0x00000000, /* Just for initialization purposes */
- CS_FL_ISBACK = 0x00000001, /* Set for CS on back-side */
+enum sc_flags {
+ SC_FL_NONE = 0x00000000, /* Just for initialization purposes */
+ SC_FL_ISBACK = 0x00000001, /* Set for SC on back-side */
/* not used: 0x00000002 */
/* not used: 0x00000004 */
- CS_FL_NOLINGER = 0x00000008, /* may close without lingering. One-shot. */
- CS_FL_NOHALF = 0x00000010, /* no half close, close both sides at once */
- CS_FL_DONT_WAKE = 0x00000020, /* resync in progress, don't wake up */
- CS_FL_INDEP_STR = 0x00000040, /* independent streams = don't update rex on write */
+ SC_FL_NOLINGER = 0x00000008, /* may close without lingering. One-shot. */
+ SC_FL_NOHALF = 0x00000010, /* no half close, close both sides at once */
+ SC_FL_DONT_WAKE = 0x00000020, /* resync in progress, don't wake up */
+ SC_FL_INDEP_STR = 0x00000040, /* independent streams = don't update rex on write */
};
/* A conn stream must have its own errors independently of the buffer's, so that
enum cs_state state; /* CS_ST* */
/* 2 bytes hole here */
- unsigned int flags; /* CS_FL_* */
+ unsigned int flags; /* SC_FL_* */
unsigned int hcto; /* half-closed timeout (0 = unset) */
struct wait_event wait_event; /* We're in a wait list */
struct sedesc *sedesc; /* points to the stream endpoint descriptor */
{
struct stream *strm = __cs_strm(cs);
- return ((cs->flags & CS_FL_ISBACK) ? &(strm->res) : &(strm->req));
+ return ((cs->flags & SC_FL_ISBACK) ? &(strm->res) : &(strm->req));
}
/* returns the channel which feeds data to this stream connector (output channel) */
{
struct stream *strm = __cs_strm(cs);
- return ((cs->flags & CS_FL_ISBACK) ? &(strm->req) : &(strm->res));
+ return ((cs->flags & SC_FL_ISBACK) ? &(strm->req) : &(strm->res));
}
/* returns the buffer which receives data from this stream connector (input channel's buffer) */
{
struct stream *strm = __cs_strm(cs);
- return ((cs->flags & CS_FL_ISBACK) ? strm->scf : strm->scb);
+ return ((cs->flags & SC_FL_ISBACK) ? strm->scf : strm->scb);
}
-/* to be called only when in CS_ST_DIS with CS_FL_ERR */
+/* to be called only when in CS_ST_DIS with SC_FL_ERR */
static inline void cs_report_error(struct stconn *cs)
{
if (!__cs_strm(cs)->conn_err_type)
{
if (cs->src)
return cs->src;
- if (!(cs->flags & CS_FL_ISBACK))
+ if (!(cs->flags & SC_FL_ISBACK))
return sess_src(strm_sess(__cs_strm(cs)));
else {
struct connection *conn = cs_conn(cs);
{
if (cs->dst)
return cs->dst;
- if (!(cs->flags & CS_FL_ISBACK))
+ if (!(cs->flags & SC_FL_ISBACK))
return sess_dst(strm_sess(__cs_strm(cs)));
else {
struct connection *conn = cs_conn(cs);
if (cs->src)
return 1;
- if (!(cs->flags & CS_FL_ISBACK))
+ if (!(cs->flags & SC_FL_ISBACK))
src = sess_src(strm_sess(__cs_strm(cs)));
else {
struct connection *conn = cs_conn(cs);
if (cs->dst)
return 1;
- if (!(cs->flags & CS_FL_ISBACK))
+ if (!(cs->flags & SC_FL_ISBACK))
dst = sess_dst(strm_sess(__cs_strm(cs)));
else {
struct connection *conn = cs_conn(cs);
/* If a frontend appctx is attached to a stream connector, release the stream
* instead of the appctx.
*/
- if (!se_fl_test(appctx->sedesc, SE_FL_ORPHAN) && !(appctx_cs(appctx)->flags & CS_FL_ISBACK)) {
+ if (!se_fl_test(appctx->sedesc, SE_FL_ORPHAN) && !(appctx_cs(appctx)->flags & SC_FL_ISBACK)) {
stream_free(appctx_strm(appctx));
return;
}
/* disable lingering */
if (s->be->options & PR_O_TCP_NOLING)
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
if (s->flags & SF_SRV_REUSED) {
_HA_ATOMIC_INC(&s->be->be_counters.reuse);
if ((rep->flags & CF_SHUTW) ||
((req->flags & CF_SHUTW_NOW) &&
(channel_is_empty(req) || (s->be->options & PR_O_ABRT_CLOSE)))) {
- cs->flags |= CS_FL_NOLINGER;
+ cs->flags |= SC_FL_NOLINGER;
cs_shutw(cs);
s->conn_err_type |= STRM_ET_CONN_ABRT;
if (s->srv_error)
((req->flags & CF_SHUTW_NOW) &&
(channel_is_empty(req) || (s->be->options & PR_O_ABRT_CLOSE)))) {
/* give up */
- cs->flags |= CS_FL_NOLINGER;
+ cs->flags |= SC_FL_NOLINGER;
cs_shutw(cs);
s->conn_err_type |= STRM_ET_CONN_ABRT;
if (s->srv_error)
check->current_step = NULL;
- check->cs = cs_new_from_check(check, CS_FL_NONE);
+ check->cs = cs_new_from_check(check, SC_FL_NONE);
if (!check->cs) {
set_server_check_status(check, HCHK_STATUS_SOCKERR, NULL);
goto end;
pcli_write_prompt(s);
- s->scb->flags |= CS_FL_NOLINGER | CS_FL_NOHALF;
+ s->scb->flags |= SC_FL_NOLINGER | SC_FL_NOHALF;
cs_shutr(s->scb);
cs_shutw(s->scb);
sockaddr_free(&s->scb->dst);
cs_set_state(s->scb, CS_ST_INI);
- s->scb->flags &= CS_FL_ISBACK | CS_FL_DONT_WAKE; /* we're in the context of process_stream */
+ s->scb->flags &= SC_FL_ISBACK | SC_FL_DONT_WAKE; /* we're in the context of process_stream */
s->req.flags &= ~(CF_SHUTW|CF_SHUTW_NOW|CF_AUTO_CONNECT|CF_WRITE_ERROR|CF_STREAMER|CF_STREAMER_FAST|CF_NEVER_WAIT|CF_WROTE_DATA);
s->res.flags &= ~(CF_SHUTR|CF_SHUTR_NOW|CF_READ_ATTACHED|CF_READ_ERROR|CF_READ_NOEXP|CF_STREAMER|CF_STREAMER_FAST|CF_WRITE_PARTIAL|CF_NEVER_WAIT|CF_WROTE_DATA|CF_READ_NULL);
s->flags &= ~(SF_DIRECT|SF_ASSIGNED|SF_BE_ASSIGNED|SF_FORCE_PRST|SF_IGNORE_PRST);
goto alloc_error;
cs->obj_type = OBJ_TYPE_CS;
- cs->flags = CS_FL_NONE;
+ cs->flags = SC_FL_NONE;
cs->state = CS_ST_INI;
cs->hcto = TICK_ETERNITY;
cs->app = NULL;
/* FIXME: Rest CS for now but must be reviewed. CS flags are only
* connection related for now but this will evolved
*/
- cs->flags &= CS_FL_ISBACK;
+ cs->flags &= SC_FL_ISBACK;
if (cs_strm(cs))
cs->ops = &sc_app_embedded_ops;
cs->data_cb = NULL;
* This function performs a shutdown-read on a detached stream connector in a
* connected or init state (it does nothing for other states). It either shuts
* the read side or marks itself as closed. The buffer flags are updated to
- * reflect the new state. If the stream connector has CS_FL_NOHALF, we also
+ * reflect the new state. If the stream connector has SC_FL_NOHALF, we also
* forward the close to the write side. The owner task is woken up if it exists.
*/
static void sc_app_shutr(struct stconn *cs)
cs->state = CS_ST_DIS;
__cs_strm(cs)->conn_exp = TICK_ETERNITY;
}
- else if (cs->flags & CS_FL_NOHALF) {
+ else if (cs->flags & SC_FL_NOHALF) {
/* we want to immediately forward this close to the write side */
return sc_app_shutw(cs);
}
/* note that if the task exists, it must unregister itself once it runs */
- if (!(cs->flags & CS_FL_DONT_WAKE))
+ if (!(cs->flags & SC_FL_DONT_WAKE))
task_wakeup(cs_strm_task(cs), TASK_WOKEN_IO);
}
/* we have to shut before closing, otherwise some short messages
* may never leave the system, especially when there are remaining
* unread data in the socket input buffer, or when nolinger is set.
- * However, if CS_FL_NOLINGER is explicitly set, we know there is
+ * However, if SC_FL_NOLINGER is explicitly set, we know there is
* no risk so we close both sides immediately.
*/
- if (!sc_ep_test(cs, SE_FL_ERROR) && !(cs->flags & CS_FL_NOLINGER) &&
+ if (!sc_ep_test(cs, SE_FL_ERROR) && !(cs->flags & SC_FL_NOLINGER) &&
!(ic->flags & (CF_SHUTR|CF_DONT_READ)))
return;
cs->state = CS_ST_DIS;
/* fall through */
default:
- cs->flags &= ~CS_FL_NOLINGER;
+ cs->flags &= ~SC_FL_NOLINGER;
cs_rx_shut_blk(cs);
ic->flags |= CF_SHUTR;
ic->rex = TICK_ETERNITY;
}
/* note that if the task exists, it must unregister itself once it runs */
- if (!(cs->flags & CS_FL_DONT_WAKE))
+ if (!(cs->flags & SC_FL_DONT_WAKE))
task_wakeup(cs_strm_task(cs), TASK_WOKEN_IO);
}
}
else {
/* (re)start reading */
- if (!(cs->flags & CS_FL_DONT_WAKE))
+ if (!(cs->flags & SC_FL_DONT_WAKE))
task_wakeup(cs_strm_task(cs), TASK_WOKEN_IO);
}
}
if (!tick_isset(oc->wex))
oc->wex = tick_add_ifset(now_ms, oc->wto);
- if (!(cs->flags & CS_FL_DONT_WAKE))
+ if (!(cs->flags & SC_FL_DONT_WAKE))
task_wakeup(cs_strm_task(cs), TASK_WOKEN_IO);
}
* a connection in a connected or init state (it does nothing for other
* states). It either shuts the read side or marks itself as closed. The buffer
* flags are updated to reflect the new state. If the stream connector has
- * CS_FL_NOHALF, we also forward the close to the write side. If a control
+ * SC_FL_NOHALF, we also forward the close to the write side. If a control
* layer is defined, then it is supposed to be a socket layer and file
* descriptors are then shutdown or closed accordingly. The function
* automatically disables polling if needed.
cs->state = CS_ST_DIS;
__cs_strm(cs)->conn_exp = TICK_ETERNITY;
}
- else if (cs->flags & CS_FL_NOHALF) {
+ else if (cs->flags & SC_FL_NOHALF) {
/* we want to immediately forward this close to the write side */
return sc_app_shutw_conn(cs);
}
/* we have to shut before closing, otherwise some short messages
* may never leave the system, especially when there are remaining
* unread data in the socket input buffer, or when nolinger is set.
- * However, if CS_FL_NOLINGER is explicitly set, we know there is
+ * However, if SC_FL_NOLINGER is explicitly set, we know there is
* no risk so we close both sides immediately.
*/
if (sc_ep_test(cs, SE_FL_ERROR)) {
/* quick close, the socket is already shut anyway */
}
- else if (cs->flags & CS_FL_NOLINGER) {
+ else if (cs->flags & SC_FL_NOLINGER) {
/* unclean data-layer shutdown, typically an aborted request
* or a forwarded shutdown from a client to a server due to
* option abortonclose. No need for the TLS layer to try to
cs->state = CS_ST_DIS;
/* fall through */
default:
- cs->flags &= ~CS_FL_NOLINGER;
+ cs->flags &= ~SC_FL_NOLINGER;
cs_rx_shut_blk(cs);
ic->flags |= CF_SHUTR;
ic->rex = TICK_ETERNITY;
!channel_is_empty(oc))
oc->wex = tick_add_ifset(now_ms, oc->wto);
- if (tick_isset(ic->rex) && !(cs->flags & CS_FL_INDEP_STR)) {
+ if (tick_isset(ic->rex) && !(cs->flags & SC_FL_INDEP_STR)) {
/* Note: to prevent the client from expiring read timeouts
* during writes, we refresh it. We only do this if the
* interface is not configured for "independent streams",
((channel_is_empty(oc) && !oc->to_forward) ||
!cs_state_in(cs->state, CS_SB_EST))))) {
out_wakeup:
- if (!(cs->flags & CS_FL_DONT_WAKE))
+ if (!(cs->flags & SC_FL_DONT_WAKE))
task_wakeup(cs_strm_task(cs), TASK_WOKEN_IO);
}
}
* This function performs a shutdown-read on a stream connector attached to an
* applet in a connected or init state (it does nothing for other states). It
* either shuts the read side or marks itself as closed. The buffer flags are
- * updated to reflect the new state. If the stream connector has CS_FL_NOHALF,
+ * updated to reflect the new state. If the stream connector has SC_FL_NOHALF,
* we also forward the close to the write side. The owner task is woken up if
* it exists.
*/
cs->state = CS_ST_DIS;
__cs_strm(cs)->conn_exp = TICK_ETERNITY;
}
- else if (cs->flags & CS_FL_NOHALF) {
+ else if (cs->flags & SC_FL_NOHALF) {
/* we want to immediately forward this close to the write side */
return sc_app_shutw_applet(cs);
}
/* we have to shut before closing, otherwise some short messages
* may never leave the system, especially when there are remaining
* unread data in the socket input buffer, or when nolinger is set.
- * However, if CS_FL_NOLINGER is explicitly set, we know there is
+ * However, if SC_FL_NOLINGER is explicitly set, we know there is
* no risk so we close both sides immediately.
*/
- if (!sc_ep_test(cs, SE_FL_ERROR) && !(cs->flags & CS_FL_NOLINGER) &&
+ if (!sc_ep_test(cs, SE_FL_ERROR) && !(cs->flags & SC_FL_NOLINGER) &&
!(ic->flags & (CF_SHUTR|CF_DONT_READ)))
return;
cs->state = CS_ST_DIS;
/* fall through */
default:
- cs->flags &= ~CS_FL_NOLINGER;
+ cs->flags &= ~SC_FL_NOLINGER;
cs_rx_shut_blk(cs);
ic->flags |= CF_SHUTR;
ic->rex = TICK_ETERNITY;
sc_ep_clr(cs, SE_FL_WAIT_DATA);
if (!tick_isset(oc->wex)) {
oc->wex = tick_add_ifset(now_ms, oc->wto);
- if (tick_isset(ic->rex) && !(cs->flags & CS_FL_INDEP_STR)) {
+ if (tick_isset(ic->rex) && !(cs->flags & SC_FL_INDEP_STR)) {
/* Note: depending on the protocol, we don't know if we're waiting
* for incoming data or not. So in order to prevent the socket from
* expiring read timeouts during writes, we refresh the read timeout,
if (tick_isset(oc->wex))
oc->wex = tick_add_ifset(now_ms, oc->wto);
- if (!(cs->flags & CS_FL_INDEP_STR))
+ if (!(cs->flags & SC_FL_INDEP_STR))
if (tick_isset(ic->rex))
ic->rex = tick_add_ifset(now_ms, ic->rto);
}
/*
* This function propagates a null read received on a socket-based connection.
- * It updates the stream connector. If the stream connector has CS_FL_NOHALF,
+ * It updates the stream connector. If the stream connector has SC_FL_NOHALF,
* the close is also forwarded to the write side as an abort.
*/
static void cs_conn_read0(struct stconn *cs)
if (oc->flags & CF_SHUTW)
goto do_close;
- if (cs->flags & CS_FL_NOHALF) {
+ if (cs->flags & SC_FL_NOHALF) {
/* we want to immediately forward this close to the write side */
/* force flag on ssl to keep stream in cache */
cs_conn_shutw(cs, CO_SHW_SILENT);
s = appctx_strm(appctx);
s->scb->dst = addr;
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
s->target = &ds->dss->srv->obj_type;
s->flags = SF_ASSIGNED;
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))
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
channel_auto_close(req);
}
else if (s->txn->meth == HTTP_METH_POST) {
stream_inc_http_fail_ctr(s);
}
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
http_reply_and_close(s, txn->status, http_error_message(s));
if (!(s->flags & SF_ERR_MASK))
txn->status = 504;
stream_inc_http_fail_ctr(s);
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
http_reply_and_close(s, txn->status, http_error_message(s));
if (!(s->flags & SF_ERR_MASK))
txn->status = 502;
stream_inc_http_fail_ctr(s);
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
http_reply_and_close(s, txn->status, http_error_message(s));
if (!(s->flags & SF_ERR_MASK))
if (!(s->flags & SF_FINST_MASK))
s->flags |= SF_FINST_H;
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
DBG_TRACE_DEVEL("leaving on error",
STRM_EV_STRM_ANA|STRM_EV_HTTP_ANA|STRM_EV_HTTP_ERR, s, txn);
return 0;
return_prx_cond:
s->logs.t_data = -1; /* was not a valid response */
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
if (!(s->flags & SF_ERR_MASK))
s->flags |= SF_ERR_PRXCOND;
/* if the server closes the connection, we want to immediately react
* and close the socket to save packets and syscalls.
*/
- s->scb->flags |= CS_FL_NOHALF;
+ s->scb->flags |= SC_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
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)
- s->scb->flags |= CS_FL_NOLINGER; /* we want to close ASAP */
+ s->scb->flags |= SC_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);
s->scb->dst = addr;
}
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
s->flags |= SF_ASSIGNED;
s->res.flags |= CF_READ_DONTWAIT;
/* initiate an outgoing connection */
s->scb->dst = addr;
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
s->flags = SF_ASSIGNED;
s->target = peer_session_target(peer, s);
proxy_inc_be_ctr(be);
/* assign new parameters to the stream from the new backend */
- s->scb->flags &= ~CS_FL_INDEP_STR;
+ s->scb->flags &= ~SC_FL_INDEP_STR;
if (be->options2 & PR_O2_INDEPSTR)
- s->scb->flags |= CS_FL_INDEP_STR;
+ s->scb->flags |= SC_FL_INDEP_STR;
if (tick_isset(be->timeout.serverfin))
s->scb->hcto = be->timeout.serverfin;
s = appctx_strm(appctx);
s->scb->dst = addr;
- s->scb->flags |= CS_FL_NOLINGER;
+ s->scb->flags |= SC_FL_NOLINGER;
s->target = &sft->srv->obj_type;
s->flags = SF_ASSIGNED;
if (cs_attach_strm(s->scf, s) < 0)
goto out_fail_attach_scf;
- s->scb = cs_new_from_strm(s, CS_FL_ISBACK);
+ s->scb = cs_new_from_strm(s, SC_FL_ISBACK);
if (!s->scb)
goto out_fail_alloc_scb;
s->scf->hcto = sess->fe->timeout.clientfin;
if (likely(sess->fe->options2 & PR_O2_INDEPSTR))
- s->scf->flags |= CS_FL_INDEP_STR;
+ s->scf->flags |= SC_FL_INDEP_STR;
s->scb->hcto = TICK_ETERNITY;
if (likely(sess->fe->options2 & PR_O2_INDEPSTR))
- s->scb->flags |= CS_FL_INDEP_STR;
+ s->scb->flags |= SC_FL_INDEP_STR;
if (sc_ep_test(cs, SE_FL_WEBSOCKET))
s->flags |= SF_WEBSOCKET;
rpf_last = res->flags & ~CF_MASK_ANALYSER;
/* we don't want the stream connector functions to recursively wake us up */
- scf->flags |= CS_FL_DONT_WAKE;
- scb->flags |= CS_FL_DONT_WAKE;
+ scf->flags |= SC_FL_DONT_WAKE;
+ scb->flags |= SC_FL_DONT_WAKE;
/* update pending events */
s->pending_events |= (state & TASK_WOKEN_ANY);
channel_check_timeouts(req);
if (unlikely((req->flags & (CF_SHUTW|CF_WRITE_TIMEOUT)) == CF_WRITE_TIMEOUT)) {
- scb->flags |= CS_FL_NOLINGER;
+ scb->flags |= SC_FL_NOLINGER;
cs_shutw(scb);
}
if (unlikely((req->flags & (CF_SHUTR|CF_READ_TIMEOUT)) == CF_READ_TIMEOUT)) {
- if (scf->flags & CS_FL_NOHALF)
- scf->flags |= CS_FL_NOLINGER;
+ if (scf->flags & SC_FL_NOHALF)
+ scf->flags |= SC_FL_NOLINGER;
cs_shutr(scf);
}
channel_check_timeouts(res);
if (unlikely((res->flags & (CF_SHUTW|CF_WRITE_TIMEOUT)) == CF_WRITE_TIMEOUT)) {
- scf->flags |= CS_FL_NOLINGER;
+ scf->flags |= SC_FL_NOLINGER;
cs_shutw(scf);
}
if (unlikely((res->flags & (CF_SHUTR|CF_READ_TIMEOUT)) == CF_READ_TIMEOUT)) {
- if (scb->flags & CS_FL_NOHALF)
- scb->flags |= CS_FL_NOLINGER;
+ if (scb->flags & SC_FL_NOHALF)
+ scb->flags |= SC_FL_NOLINGER;
cs_shutr(scb);
}
!(s->flags & SF_CONN_EXP) &&
!((sc_ep_get(scf) | scb->flags) & SE_FL_ERROR) &&
((s->pending_events & TASK_WOKEN_ANY) == TASK_WOKEN_TIMER)) {
- scf->flags &= ~CS_FL_DONT_WAKE;
- scb->flags &= ~CS_FL_DONT_WAKE;
+ scf->flags &= ~SC_FL_DONT_WAKE;
+ scb->flags &= ~SC_FL_DONT_WAKE;
goto update_exp_and_leave;
}
}
if (unlikely((req->flags & (CF_SHUTW|CF_SHUTW_NOW)) == CF_SHUTW_NOW &&
channel_is_empty(req))) {
if (req->flags & CF_READ_ERROR)
- scb->flags |= CS_FL_NOLINGER;
+ scb->flags |= SC_FL_NOLINGER;
cs_shutw(scb);
}
/* shutdown(read) pending */
if (unlikely((req->flags & (CF_SHUTR|CF_SHUTR_NOW)) == CF_SHUTR_NOW)) {
- if (scf->flags & CS_FL_NOHALF)
- scf->flags |= CS_FL_NOLINGER;
+ if (scf->flags & SC_FL_NOHALF)
+ scf->flags |= SC_FL_NOLINGER;
cs_shutr(scf);
}
/* shutdown(read) pending */
if (unlikely((res->flags & (CF_SHUTR|CF_SHUTR_NOW)) == CF_SHUTR_NOW)) {
- if (scb->flags & CS_FL_NOHALF)
- scb->flags |= CS_FL_NOLINGER;
+ if (scb->flags & SC_FL_NOHALF)
+ scb->flags |= SC_FL_NOLINGER;
cs_shutr(scb);
}
goto resync_request;
/* we're interested in getting wakeups again */
- scf->flags &= ~CS_FL_DONT_WAKE;
- scb->flags &= ~CS_FL_DONT_WAKE;
+ scf->flags &= ~SC_FL_DONT_WAKE;
+ scb->flags &= ~SC_FL_DONT_WAKE;
if (likely((scf->state != CS_ST_CLO) || !cs_state_in(scb->state, CS_SB_INI|CS_SB_CLO) ||
(req->analysers & AN_REQ_FLT_END) || (res->analysers & AN_RES_FLT_END))) {
s->pending_events = 0;
update_exp_and_leave:
- /* Note: please ensure that if you branch here you disable CS_FL_DONT_WAKE */
+ /* Note: please ensure that if you branch here you disable SC_FL_DONT_WAKE */
t->expire = tick_first((tick_is_expired(t->expire, now_ms) ? 0 : t->expire),
tick_first(tick_first(req->rex, req->wex),
tick_first(res->rex, res->wex)));
* is present, returning with ERR will cause lingering to be disabled.
*/
if (strm)
- strm->scf->flags |= CS_FL_NOLINGER;
+ strm->scf->flags |= SC_FL_NOLINGER;
if (conn->flags & CO_FL_FDLESS)
goto out;
goto deny;
}
else if (rule->action == ACT_TCP_CLOSE) {
- chn_prod(rep)->flags |= CS_FL_NOLINGER | CS_FL_NOHALF;
+ chn_prod(rep)->flags |= SC_FL_NOLINGER | SC_FL_NOHALF;
cs_must_kill_conn(chn_prod(rep));
cs_shutr(chn_prod(rep));
cs_shutw(chn_prod(rep));