DECLARE_POOL(pool_head_sedesc, "sedesc", sizeof(struct sedesc));
/* functions used by default on a detached stream connector */
-static void sc_app_shutr(struct stconn *sc);
+static void sc_app_abort(struct stconn *sc);
static void sc_app_shutw(struct stconn *sc);
static void sc_app_chk_rcv(struct stconn *sc);
static void sc_app_chk_snd(struct stconn *sc);
/* functions used on a mux-based stream connector */
-static void sc_app_shutr_conn(struct stconn *sc);
+static void sc_app_abort_conn(struct stconn *sc);
static void sc_app_shutw_conn(struct stconn *sc);
static void sc_app_chk_rcv_conn(struct stconn *sc);
static void sc_app_chk_snd_conn(struct stconn *sc);
/* functions used on an applet-based stream connector */
-static void sc_app_shutr_applet(struct stconn *sc);
+static void sc_app_abort_applet(struct stconn *sc);
static void sc_app_shutw_applet(struct stconn *sc);
static void sc_app_chk_rcv_applet(struct stconn *sc);
static void sc_app_chk_snd_applet(struct stconn *sc);
struct sc_app_ops sc_app_conn_ops = {
.chk_rcv = sc_app_chk_rcv_conn,
.chk_snd = sc_app_chk_snd_conn,
- .shutr = sc_app_shutr_conn,
+ .abort = sc_app_abort_conn,
.shutw = sc_app_shutw_conn,
.wake = sc_conn_process,
.name = "STRM",
struct sc_app_ops sc_app_embedded_ops = {
.chk_rcv = sc_app_chk_rcv,
.chk_snd = sc_app_chk_snd,
- .shutr = sc_app_shutr,
+ .abort = sc_app_abort,
.shutw = sc_app_shutw,
.wake = NULL, /* may never be used */
.name = "NONE", /* may never be used */
struct sc_app_ops sc_app_applet_ops = {
.chk_rcv = sc_app_chk_rcv_applet,
.chk_snd = sc_app_chk_snd_applet,
- .shutr = sc_app_shutr_applet,
+ .abort = sc_app_abort_applet,
.shutw = sc_app_shutw_applet,
.wake = sc_applet_process,
.name = "STRM",
struct sc_app_ops sc_app_check_ops = {
.chk_rcv = NULL,
.chk_snd = NULL,
- .shutr = NULL,
+ .abort = NULL,
.shutw = NULL,
.wake = wake_srv_chk,
.name = "CHCK",
* 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 *sc)
+static void sc_app_abort(struct stconn *sc)
{
struct channel *ic = sc_ic(sc);
* descriptors are then shutdown or closed accordingly. The function
* automatically disables polling if needed.
*/
-static void sc_app_shutr_conn(struct stconn *sc)
+static void sc_app_abort_conn(struct stconn *sc)
{
struct channel *ic = sc_ic(sc);
__fallthrough;
case SC_ST_CON:
/* we may have to close a pending connection, and mark the
- * response buffer as shutr
+ * response buffer as abort
*/
sc_conn_shut(sc);
__fallthrough;
* we also forward the close to the write side. The owner task is woken up if
* it exists.
*/
-static void sc_app_shutr_applet(struct stconn *sc)
+static void sc_app_abort_applet(struct stconn *sc)
{
struct channel *ic = sc_ic(sc);
sc->flags |= SC_FL_ABRT_DONE;
ic->flags |= CF_READ_EVENT;
- /* Note: on shutr, we don't call the applet */
+ /* Note: on abort, we don't call the applet */
if (!sc_state_in(sc->state, SC_SB_CON|SC_SB_RDY|SC_SB_EST))
return;
if ((sc->wait_event.events & SUB_RETRY_RECV) || sc_waiting_room(sc))
return 0;
- /* maybe we were called immediately after an asynchronous shutr */
+ /* maybe we were called immediately after an asynchronous abort */
if (sc->flags & SC_FL_ABRT_DONE)
return 1;
if (sc_ep_test(sc, SE_FL_EOS)) {
/* we received a shutdown */
- sc_shutr(sc);
+ sc_abort(sc);
}
/* If the applet wants to write and the channel is closed, it's a
if (unlikely(!(s->scf->flags & SC_FL_ABRT_DONE) && (s->req.flags & CF_READ_TIMEOUT))) {
if (s->scf->flags & SC_FL_NOHALF)
s->scf->flags |= SC_FL_NOLINGER;
- sc_shutr(s->scf);
+ sc_abort(s->scf);
}
if (unlikely(!(s->scf->flags & SC_FL_SHUTW) && (s->res.flags & CF_WRITE_TIMEOUT))) {
s->scf->flags |= SC_FL_NOLINGER;
if (unlikely(!(s->scb->flags & SC_FL_ABRT_DONE) && (s->res.flags & CF_READ_TIMEOUT))) {
if (s->scb->flags & SC_FL_NOHALF)
s->scb->flags |= SC_FL_NOLINGER;
- sc_shutr(s->scb);
+ sc_abort(s->scb);
}
if (HAS_FILTERS(s))
srv = objt_server(s->target);
if (unlikely(sc_ep_test(scf, SE_FL_ERROR))) {
if (sc_state_in(scf->state, SC_SB_EST|SC_SB_DIS)) {
- sc_shutr(scf);
+ sc_abort(scf);
sc_shutw(scf);
//sc_report_error(scf); TODO: Be sure it is useless
if (!(req->analysers) && !(res->analysers)) {
if (unlikely(sc_ep_test(scb, SE_FL_ERROR))) {
if (sc_state_in(scb->state, SC_SB_EST|SC_SB_DIS)) {
- sc_shutr(scb);
+ sc_abort(scb);
sc_shutw(scb);
//sc_report_error(scb); TODO: Be sure it is useless
_HA_ATOMIC_INC(&s->be->be_counters.failed_resp);
if (unlikely((scf->flags & (SC_FL_ABRT_DONE|SC_FL_ABRT_WANTED)) == SC_FL_ABRT_WANTED)) {
if (scf->flags & SC_FL_NOHALF)
scf->flags |= SC_FL_NOLINGER;
- sc_shutr(scf);
+ sc_abort(scf);
}
/* Benchmarks have shown that it's optimal to do a full resync now */
if (unlikely((scb->flags & (SC_FL_ABRT_DONE|SC_FL_ABRT_WANTED)) == SC_FL_ABRT_WANTED)) {
if (scb->flags & SC_FL_NOHALF)
scb->flags |= SC_FL_NOLINGER;
- sc_shutr(scb);
+ sc_abort(scb);
}
if (scf->state == SC_ST_DIS ||