]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stconn: rename cs_{shut,chk}* to sc_*
authorWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 07:00:19 +0000 (09:00 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 27 May 2022 17:33:35 +0000 (19:33 +0200)
This applies the following renaming:

cs_shutr() -> sc_shutr()
cs_shutw() -> sc_shutw()
cs_chk_rcv() -> sc_chk_rcv()
cs_chk_snd() -> sc_chk_snd()
cs_must_kill_conn() -> sc_must_kill_conn()

18 files changed:
addons/promex/service-prometheus.c
include/haproxy/cs_utils.h
src/backend.c
src/cache.c
src/cli.c
src/conn_stream.c
src/dns.c
src/flt_spoe.c
src/hlua.c
src/http_act.c
src/http_ana.c
src/http_client.c
src/log.c
src/peers.c
src/sink.c
src/stats.c
src/stream.c
src/tcp_rules.c

index 8469942ccdde88ab47fbfdeb0185328fcfc7a3fd..4dffbf33f537fafbc6d126eb31c8db6e91576d7a 100644 (file)
@@ -1571,7 +1571,7 @@ static void promex_appctx_handle_io(struct appctx *appctx)
                case PROMEX_ST_END:
                        if (!(res->flags & CF_SHUTR)) {
                                res->flags |= CF_READ_NULL;
-                               cs_shutr(cs);
+                               sc_shutr(cs);
                        }
        }
 
@@ -1587,8 +1587,8 @@ static void promex_appctx_handle_io(struct appctx *appctx)
 
   error:
        res->flags |= CF_READ_NULL;
-       cs_shutr(cs);
-       cs_shutw(cs);
+       sc_shutr(cs);
+       sc_shutw(cs);
 }
 
 struct applet promex_applet = {
index e72ea43c1b38c7bc76a3bbec5f0eee2f693d797b..6f3c6cfa81404055eea931ee55c518d50cf2ad39 100644 (file)
@@ -266,21 +266,21 @@ static inline int sc_get_dst(struct stconn *cs)
 
 
 /* Marks on the stream connector that next shutw must kill the whole connection */
-static inline void cs_must_kill_conn(struct stconn *cs)
+static inline void sc_must_kill_conn(struct stconn *cs)
 {
        sc_ep_set(cs, SE_FL_KILL_CONN);
 }
 
 
 /* Sends a shutr to the endpoint using the data layer */
-static inline void cs_shutr(struct stconn *cs)
+static inline void sc_shutr(struct stconn *cs)
 {
        if (likely(cs->app_ops->shutr))
                cs->app_ops->shutr(cs);
 }
 
 /* Sends a shutw to the endpoint using the data layer */
-static inline void cs_shutw(struct stconn *cs)
+static inline void sc_shutw(struct stconn *cs)
 {
        if (likely(cs->app_ops->shutw))
                cs->app_ops->shutw(cs);
@@ -316,7 +316,7 @@ static inline int sc_is_recv_allowed(const struct stconn *sc)
  * point in order to avoid useless repeated wakeups.
  * It will then call ->chk_rcv() to enable receipt of new data.
  */
-static inline void cs_chk_rcv(struct stconn *cs)
+static inline void sc_chk_rcv(struct stconn *cs)
 {
        if (sc_ep_test(cs, SE_FL_APPLET_NEED_CONN) &&
            cs_state_in(cs_opposite(cs)->state, SC_SB_RDY|SC_SB_EST|SC_SB_DIS|SC_SB_CLO))
@@ -334,7 +334,7 @@ static inline void cs_chk_rcv(struct stconn *cs)
 }
 
 /* Calls chk_snd on the endpoint using the data layer */
-static inline void cs_chk_snd(struct stconn *cs)
+static inline void sc_chk_snd(struct stconn *cs)
 {
        if (likely(cs->app_ops->chk_snd))
                cs->app_ops->chk_snd(cs);
index f794464d1de57318fb7678a93ca62fe8e8ec60ee..00390f868a04a4085e7e42296d61cdac883bd1cf 100644 (file)
@@ -2023,8 +2023,8 @@ void back_try_conn_req(struct stream *s)
                                process_srv_queue(srv);
 
                        /* Failed and not retryable. */
-                       cs_shutr(cs);
-                       cs_shutw(cs);
+                       sc_shutr(cs);
+                       sc_shutw(cs);
                        req->flags |= CF_WRITE_ERROR;
 
                        s->logs.t_queue = tv_ms_elapsed(&s->logs.tv_accept, &now);
@@ -2083,8 +2083,8 @@ void back_try_conn_req(struct stream *s)
                        if (srv)
                                _HA_ATOMIC_INC(&srv->counters.failed_conns);
                        _HA_ATOMIC_INC(&s->be->be_counters.failed_conns);
-                       cs_shutr(cs);
-                       cs_shutw(cs);
+                       sc_shutr(cs);
+                       sc_shutw(cs);
                        req->flags |= CF_WRITE_TIMEOUT;
                        if (!s->conn_err_type)
                                s->conn_err_type = STRM_ET_QUEUE_TO;
@@ -2143,8 +2143,8 @@ abort_connection:
        /* give up */
        s->conn_exp = TICK_ETERNITY;
        s->flags &= ~SF_CONN_EXP;
-       cs_shutr(cs);
-       cs_shutw(cs);
+       sc_shutr(cs);
+       sc_shutw(cs);
        cs->state = SC_ST_CLO;
        if (s->srv_error)
                s->srv_error(s, cs);
@@ -2183,8 +2183,8 @@ void back_handle_st_req(struct stream *s)
                         */
                        s->flags &= ~(SF_ERR_MASK | SF_FINST_MASK);
 
-                       cs_shutr(cs);
-                       cs_shutw(cs);
+                       sc_shutr(cs);
+                       sc_shutw(cs);
                        s->req.flags |= CF_WRITE_ERROR;
                        s->conn_err_type = STRM_ET_CONN_RES;
                        cs->state = SC_ST_CLO;
@@ -2209,8 +2209,8 @@ void back_handle_st_req(struct stream *s)
                }
 
                /* we did not get any server, let's check the cause */
-               cs_shutr(cs);
-               cs_shutw(cs);
+               sc_shutr(cs);
+               sc_shutw(cs);
                s->req.flags |= CF_WRITE_ERROR;
                if (!s->conn_err_type)
                        s->conn_err_type = STRM_ET_CONN_OTHER;
@@ -2251,7 +2251,7 @@ void back_handle_st_con(struct stream *s)
            ((req->flags & CF_SHUTW_NOW) &&
             (channel_is_empty(req) || (s->be->options & PR_O_ABRT_CLOSE)))) {
                cs->flags |= SC_FL_NOLINGER;
-               cs_shutw(cs);
+               sc_shutw(cs);
                s->conn_err_type |= STRM_ET_CONN_ABRT;
                if (s->srv_error)
                        s->srv_error(s, cs);
@@ -2347,7 +2347,7 @@ void back_handle_st_cer(struct stream *s)
                        process_srv_queue(objt_server(s->target));
 
                /* shutw is enough to stop a connecting socket */
-               cs_shutw(cs);
+               sc_shutw(cs);
                s->req.flags |= CF_WRITE_ERROR;
                s->res.flags |= CF_READ_ERROR;
 
@@ -2381,7 +2381,7 @@ void back_handle_st_cer(struct stream *s)
                        process_srv_queue(objt_server(s->target));
 
                /* shutw is enough to stop a connecting socket */
-               cs_shutw(cs);
+               sc_shutw(cs);
                s->req.flags |= CF_WRITE_ERROR;
                s->res.flags |= CF_READ_ERROR;
 
@@ -2480,7 +2480,7 @@ void back_handle_st_rdy(struct stream *s)
                     (channel_is_empty(req) || (s->be->options & PR_O_ABRT_CLOSE)))) {
                        /* give up */
                        cs->flags |= SC_FL_NOLINGER;
-                       cs_shutw(cs);
+                       sc_shutw(cs);
                        s->conn_err_type |= STRM_ET_CONN_ABRT;
                        if (s->srv_error)
                                s->srv_error(s, cs);
index 7b4e1253316133b5fa2cd431a0488ba689703eab..366add80c62d31750a042c3c4635e209cee198ef 100644 (file)
@@ -1534,7 +1534,7 @@ static void http_cache_io_handler(struct appctx *appctx)
   end:
        if (!(res->flags & CF_SHUTR) && appctx->st0 == HTX_CACHE_END) {
                res->flags |= CF_READ_NULL;
-               cs_shutr(cs);
+               sc_shutr(cs);
        }
 
   out:
index 685168b63aa185e7081b5c647a892fb7b8315f7d..d5e2d8874796ce37605e7db47697294912fc42c0 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -928,7 +928,7 @@ static void cli_io_handler(struct appctx *appctx)
                        /* Let's close for real now. We just close the request
                         * side, the conditions below will complete if needed.
                         */
-                       cs_shutw(cs);
+                       sc_shutw(cs);
                        free_trash_chunk(appctx->chunk);
                        appctx->chunk = NULL;
                        break;
@@ -1176,7 +1176,7 @@ static void cli_io_handler(struct appctx *appctx)
                 * we forward the close to the request side so that it flows upstream to
                 * the client.
                 */
-               cs_shutw(cs);
+               sc_shutw(cs);
        }
 
        if ((req->flags & CF_SHUTW) && (cs->state == SC_ST_EST) && (appctx->st0 < CLI_ST_OUTPUT)) {
@@ -1186,7 +1186,7 @@ static void cli_io_handler(struct appctx *appctx)
                 * the client side has closed. So we'll forward this state downstream
                 * on the response buffer.
                 */
-               cs_shutr(cs);
+               sc_shutr(cs);
                res->flags |= CF_READ_NULL;
        }
 
@@ -2698,8 +2698,8 @@ int pcli_wait_for_response(struct stream *s, struct channel *rep, int an_bit)
                pcli_write_prompt(s);
 
                s->scb->flags |= SC_FL_NOLINGER | SC_FL_NOHALF;
-               cs_shutr(s->scb);
-               cs_shutw(s->scb);
+               sc_shutr(s->scb);
+               sc_shutw(s->scb);
 
                /*
                 * starting from there this the same code as
index 4aabf1f5a57cdcc46bc1530d5a69f73d6ada94d7..af40111b7817b5c3b0d835a940348c8776db0834 100644 (file)
@@ -807,7 +807,7 @@ static void sc_app_chk_snd_conn(struct stconn *cs)
                if (((oc->flags & (CF_SHUTW|CF_AUTO_CLOSE|CF_SHUTW_NOW)) ==
                     (CF_AUTO_CLOSE|CF_SHUTW_NOW)) &&
                    cs_state_in(cs->state, SC_SB_RDY|SC_SB_EST)) {
-                       cs_shutw(cs);
+                       sc_shutw(cs);
                        goto out_wakeup;
                }
 
@@ -1036,7 +1036,7 @@ void sc_update_rx(struct stconn *cs)
        else if (!(ic->flags & CF_READ_NOEXP) && !tick_isset(ic->rex))
                ic->rex = tick_add_ifset(now_ms, ic->rto);
 
-       cs_chk_rcv(cs);
+       sc_chk_rcv(cs);
 }
 
 /* This function is designed to be called from within the stream handler to
@@ -1110,7 +1110,7 @@ static void sc_notify(struct stconn *cs)
 
                if (((oc->flags & (CF_SHUTW|CF_SHUTW_NOW)) == CF_SHUTW_NOW) &&
                    (cs->state == SC_ST_EST) && (!conn || !(conn->flags & (CO_FL_WAIT_XPRT | CO_FL_EARLY_SSL_HS))))
-                       cs_shutw(cs);
+                       sc_shutw(cs);
                oc->wex = TICK_ETERNITY;
        }
 
@@ -1160,7 +1160,7 @@ static void sc_notify(struct stconn *cs)
                if (ic->pipe)
                        last_len += ic->pipe->data;
 
-               cs_chk_snd(cso);
+               sc_chk_snd(cso);
 
                new_len = co_data(ic);
                if (ic->pipe)
@@ -1176,15 +1176,15 @@ static void sc_notify(struct stconn *cs)
        if (!(ic->flags & CF_DONT_READ))
                sc_will_read(cs);
 
-       cs_chk_rcv(cs);
-       cs_chk_rcv(cso);
+       sc_chk_rcv(cs);
+       sc_chk_rcv(cso);
 
        if (ic->flags & CF_SHUTR || sc_ep_test(cs, SE_FL_APPLET_NEED_CONN) ||
            (cs->flags & (SC_FL_WONT_READ|SC_FL_NEED_BUFF|SC_FL_NEED_ROOM))) {
                ic->rex = TICK_ETERNITY;
        }
        else if ((ic->flags & (CF_SHUTR|CF_READ_PARTIAL)) == CF_READ_PARTIAL) {
-               /* we must re-enable reading if cs_chk_snd() has freed some space */
+               /* we must re-enable reading if sc_chk_snd() has freed some space */
                if (!(ic->flags & CF_READ_NOEXP) && tick_isset(ic->rex))
                        ic->rex = tick_add_ifset(now_ms, ic->rto);
        }
@@ -1257,7 +1257,7 @@ static void sc_conn_read0(struct stconn *cs)
        return;
 
  do_close:
-       /* OK we completely close the socket here just as if we went through cs_shut[rw]() */
+       /* OK we completely close the socket here just as if we went through sc_shut[rw]() */
        sc_conn_shut(cs);
 
        oc->flags &= ~CF_SHUTW_NOW;
index 69f16bc42b65dc4da6b82805e13a6143a21c7f9c..749387ebfd3632028dfd042e39d39addb9f6520a 100644 (file)
--- a/src/dns.c
+++ b/src/dns.c
@@ -764,8 +764,8 @@ read:
 
        return;
 close:
-       cs_shutw(cs);
-       cs_shutr(cs);
+       sc_shutw(cs);
+       sc_shutr(cs);
        sc_ic(cs)->flags |= CF_READ_NULL;
 }
 
index 53c8defef3779c701620da389f3b090a6a7c265f..178cb187cfd46342f4ab918dd349837eb5b202b7 100644 (file)
@@ -1301,8 +1301,8 @@ spoe_release_appctx(struct appctx *appctx)
                if (spoe_appctx->status_code == SPOE_FRM_ERR_NONE)
                        spoe_appctx->status_code = SPOE_FRM_ERR_IO;
 
-               cs_shutw(cs);
-               cs_shutr(cs);
+               sc_shutw(cs);
+               sc_shutr(cs);
                sc_ic(cs)->flags |= CF_READ_NULL;
        }
 
@@ -2007,8 +2007,8 @@ spoe_handle_appctx(struct appctx *appctx)
                        appctx->st0 = SPOE_APPCTX_ST_END;
                        SPOE_APPCTX(appctx)->task->expire = TICK_ETERNITY;
 
-                       cs_shutw(cs);
-                       cs_shutr(cs);
+                       sc_shutw(cs);
+                       sc_shutr(cs);
                        sc_ic(cs)->flags |= CF_READ_NULL;
                        /* fall through */
 
index f84b9e0e38103de0bf1d8bce4cc4328cd42bb360..7efdd6363ea3e4b2719c3f6cb54d4ad0064a77f3 100644 (file)
@@ -1936,8 +1936,8 @@ static void hlua_socket_handler(struct appctx *appctx)
        struct stconn *cs = appctx_cs(appctx);
 
        if (ctx->die) {
-               cs_shutw(cs);
-               cs_shutr(cs);
+               sc_shutw(cs);
+               sc_shutr(cs);
                sc_ic(cs)->flags |= CF_READ_NULL;
                notification_wake(&ctx->wake_on_read);
                notification_wake(&ctx->wake_on_write);
@@ -9341,7 +9341,7 @@ void hlua_applet_tcp_fct(struct appctx *ctx)
                /* eat the whole request */
                co_skip(sc_oc(cs), co_data(sc_oc(cs)));
                res->flags |= CF_READ_NULL;
-               cs_shutr(cs);
+               sc_shutr(cs);
                return;
 
        /* yield. */
@@ -9386,8 +9386,8 @@ void hlua_applet_tcp_fct(struct appctx *ctx)
 error:
 
        /* For all other cases, just close the stream. */
-       cs_shutw(cs);
-       cs_shutr(cs);
+       sc_shutw(cs);
+       sc_shutr(cs);
        tcp_ctx->flags |= APPLET_DONE;
 }
 
@@ -9624,7 +9624,7 @@ void hlua_applet_http_fct(struct appctx *ctx)
        if (http_ctx->flags & APPLET_DONE) {
                if (!(res->flags & CF_SHUTR)) {
                        res->flags |= CF_READ_NULL;
-                       cs_shutr(cs);
+                       sc_shutr(cs);
                }
 
                /* eat the whole request */
index 95f6fdebeae600d6d27d422c95dd75ef80c1b6d0..51ba6cba7be24ddf35cc107e95c59c9db2439523 100644 (file)
@@ -719,7 +719,7 @@ static enum act_parse_ret parse_http_set_status(const char **args, int *orig_arg
 static enum act_return http_action_reject(struct act_rule *rule, struct proxy *px,
                                           struct session *sess, struct stream *s, int flags)
 {
-       cs_must_kill_conn(chn_prod(&s->req));
+       sc_must_kill_conn(chn_prod(&s->req));
        channel_abort(&s->req);
        channel_abort(&s->res);
        s->req.analysers &= AN_REQ_FLT_END;
index 303739e127bded98aaa853aec5b9fc13bca28219..cb7bbbfc06683e49756555b901b5ebc927f6cbe8 100644 (file)
@@ -4313,8 +4313,8 @@ void http_perform_server_redirect(struct stream *s, struct stconn *cs)
                goto fail;
 
        /* return without error. */
-       cs_shutr(cs);
-       cs_shutw(cs);
+       sc_shutr(cs);
+       sc_shutw(cs);
        s->conn_err_type = STRM_ET_NONE;
        cs->state = SC_ST_CLO;
 
index ee0c69a26081d00e973f18312037b3089dcd0d77..fe4e1d6de63fe3fdc2eca0bdad8ec7afd633742a 100644 (file)
@@ -238,8 +238,8 @@ static int hc_cli_io_handler(struct appctx *appctx)
 
        /* we must close only if F_END is the last flag */
        if (ctx->flags ==  HC_CLI_F_RES_END) {
-               cs_shutw(cs);
-               cs_shutr(cs);
+               sc_shutw(cs);
+               sc_shutr(cs);
                ctx->flags &= ~HC_CLI_F_RES_END;
                goto out;
        }
@@ -933,8 +933,8 @@ more:
        return;
 
 end:
-       cs_shutw(cs);
-       cs_shutr(cs);
+       sc_shutw(cs);
+       sc_shutr(cs);
        return;
 }
 
index 35b7597337e2081c14ac2a4408f8b827e5cd84a1..25eff5e7878f7ee65ac51627fd1242e8247230d1 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -3680,8 +3680,8 @@ cli_abort:
        _HA_ATOMIC_INC(&frontend->fe_counters.cli_aborts);
 
 close:
-       cs_shutw(cs);
-       cs_shutr(cs);
+       sc_shutw(cs);
+       sc_shutr(cs);
 
        sc_ic(cs)->flags |= CF_READ_NULL;
 
index ae650a6384255d7132fcba19b27f41799d35ac72..1fc08e7042ac803e5252d6efd00839007420f2d0 100644 (file)
@@ -3127,8 +3127,8 @@ send_msgs:
                                        HA_SPIN_UNLOCK(PEER_LOCK, &curpeer->lock);
                                        curpeer = NULL;
                                }
-                               cs_shutw(cs);
-                               cs_shutr(cs);
+                               sc_shutw(cs);
+                               sc_shutr(cs);
                                sc_ic(cs)->flags |= CF_READ_NULL;
                                goto out;
                        }
index 4f39c05d0aad48bf6533d44c90e55e489ef3a3fe..792eb64ff6a4c282abbb6722537633e286a725aa 100644 (file)
@@ -426,8 +426,8 @@ static void sink_forward_io_handler(struct appctx *appctx)
        return;
 
 close:
-       cs_shutw(cs);
-       cs_shutr(cs);
+       sc_shutw(cs);
+       sc_shutr(cs);
        sc_ic(cs)->flags |= CF_READ_NULL;
 }
 
@@ -570,8 +570,8 @@ static void sink_forward_oc_io_handler(struct appctx *appctx)
        return;
 
 close:
-       cs_shutw(cs);
-       cs_shutr(cs);
+       sc_shutw(cs);
+       sc_shutr(cs);
        sc_ic(cs)->flags |= CF_READ_NULL;
 }
 
index cd9dd452d7eabf8fca1f05ba8f146c59c698d5d7..c1fedaaf2d747c006408ddf51cf55aa5bb7bbd4e 100644 (file)
@@ -4356,7 +4356,7 @@ static void http_stats_io_handler(struct appctx *appctx)
        if (appctx->st0 == STAT_HTTP_END) {
                if (!(res->flags & CF_SHUTR)) {
                        res->flags |= CF_READ_NULL;
-                       cs_shutr(cs);
+                       sc_shutr(cs);
                }
 
                /* eat the whole request */
index b141f17c33b5d10313af22003787f1e7f6d5016a..686f11641074e3a085fce3f81cd359bcfb3b9211 100644 (file)
@@ -936,7 +936,7 @@ static void back_establish(struct stream *s)
                 * delayed recv here to give a chance to the data to flow back
                 * by the time we process other tasks.
                 */
-               cs_chk_rcv(s->scb);
+               sc_chk_rcv(s->scb);
        }
        req->wex = TICK_ETERNITY;
        /* If we managed to get the whole response, and we don't have anything
@@ -1680,26 +1680,26 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
 
                if (unlikely((req->flags & (CF_SHUTW|CF_WRITE_TIMEOUT)) == CF_WRITE_TIMEOUT)) {
                        scb->flags |= SC_FL_NOLINGER;
-                       cs_shutw(scb);
+                       sc_shutw(scb);
                }
 
                if (unlikely((req->flags & (CF_SHUTR|CF_READ_TIMEOUT)) == CF_READ_TIMEOUT)) {
                        if (scf->flags & SC_FL_NOHALF)
                                scf->flags |= SC_FL_NOLINGER;
-                       cs_shutr(scf);
+                       sc_shutr(scf);
                }
 
                channel_check_timeouts(res);
 
                if (unlikely((res->flags & (CF_SHUTW|CF_WRITE_TIMEOUT)) == CF_WRITE_TIMEOUT)) {
                        scf->flags |= SC_FL_NOLINGER;
-                       cs_shutw(scf);
+                       sc_shutw(scf);
                }
 
                if (unlikely((res->flags & (CF_SHUTR|CF_READ_TIMEOUT)) == CF_READ_TIMEOUT)) {
                        if (scb->flags & SC_FL_NOHALF)
                                scb->flags |= SC_FL_NOLINGER;
-                       cs_shutr(scb);
+                       sc_shutr(scb);
                }
 
                if (HAS_FILTERS(s))
@@ -1754,8 +1754,8 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
        srv = objt_server(s->target);
        if (unlikely(sc_ep_test(scf, SE_FL_ERROR))) {
                if (cs_state_in(scf->state, SC_SB_EST|SC_SB_DIS)) {
-                       cs_shutr(scf);
-                       cs_shutw(scf);
+                       sc_shutr(scf);
+                       sc_shutw(scf);
                        cs_report_error(scf);
                        if (!(req->analysers) && !(res->analysers)) {
                                _HA_ATOMIC_INC(&s->be->be_counters.cli_aborts);
@@ -1774,8 +1774,8 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
 
        if (unlikely(sc_ep_test(scb, SE_FL_ERROR))) {
                if (cs_state_in(scb->state, SC_SB_EST|SC_SB_DIS)) {
-                       cs_shutr(scb);
-                       cs_shutw(scb);
+                       sc_shutr(scb);
+                       sc_shutw(scb);
                        cs_report_error(scb);
                        _HA_ATOMIC_INC(&s->be->be_counters.failed_resp);
                        if (srv)
@@ -2308,7 +2308,7 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
                     channel_is_empty(req))) {
                if (req->flags & CF_READ_ERROR)
                        scb->flags |= SC_FL_NOLINGER;
-               cs_shutw(scb);
+               sc_shutw(scb);
        }
 
        /* shutdown(write) done on server side, we must stop the client too */
@@ -2320,7 +2320,7 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
        if (unlikely((req->flags & (CF_SHUTR|CF_SHUTR_NOW)) == CF_SHUTR_NOW)) {
                if (scf->flags & SC_FL_NOHALF)
                        scf->flags |= SC_FL_NOLINGER;
-               cs_shutr(scf);
+               sc_shutr(scf);
        }
 
        /* Benchmarks have shown that it's optimal to do a full resync now */
@@ -2433,7 +2433,7 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
        /* shutdown(write) pending */
        if (unlikely((res->flags & (CF_SHUTW|CF_SHUTW_NOW)) == CF_SHUTW_NOW &&
                     channel_is_empty(res))) {
-               cs_shutw(scf);
+               sc_shutw(scf);
        }
 
        /* shutdown(write) done on the client side, we must stop the server too */
@@ -2445,7 +2445,7 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
        if (unlikely((res->flags & (CF_SHUTR|CF_SHUTR_NOW)) == CF_SHUTR_NOW)) {
                if (scb->flags & SC_FL_NOHALF)
                        scb->flags |= SC_FL_NOLINGER;
-               cs_shutr(scb);
+               sc_shutr(scb);
        }
 
        if (scf->state == SC_ST_DIS ||
index f9656c029179af191473f124cb2c994951820b18..8b9aa7656c5c5bf0da7641889a9a152fff88e2dc 100644 (file)
@@ -254,7 +254,7 @@ resume_execution:
                _HA_ATOMIC_INC(&sess->listener->counters->failed_req);
 
  reject:
-       cs_must_kill_conn(chn_prod(req));
+       sc_must_kill_conn(chn_prod(req));
        channel_abort(req);
        channel_abort(&s->res);
 
@@ -392,9 +392,9 @@ resume_execution:
                        }
                        else if (rule->action == ACT_TCP_CLOSE) {
                                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));
+                               sc_must_kill_conn(chn_prod(rep));
+                               sc_shutr(chn_prod(rep));
+                               sc_shutw(chn_prod(rep));
                                s->last_rule_file = rule->conf.file;
                                s->last_rule_line = rule->conf.line;
                                goto end;
@@ -451,7 +451,7 @@ resume_execution:
                _HA_ATOMIC_INC(&__objt_server(s->target)->counters.failed_resp);
 
  reject:
-       cs_must_kill_conn(chn_prod(rep));
+       sc_must_kill_conn(chn_prod(rep));
        channel_abort(rep);
        channel_abort(&s->req);