CLEANUP: stconn: rename cs_{shut,chk}* to sc_*

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()
diff --git a/src/backend.c b/src/backend.c
index f794464..00390f8 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -2023,8 +2023,8 @@
 				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 @@
 			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 @@
 	/* 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 @@
 			 */
 			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 @@
 		}
 
 		/* 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 @@
 	    ((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 @@
 			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 @@
 			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 @@
 		     (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);
diff --git a/src/cache.c b/src/cache.c
index 7b4e125..366add8 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -1534,7 +1534,7 @@
   end:
 	if (!(res->flags & CF_SHUTR) && appctx->st0 == HTX_CACHE_END) {
 		res->flags |= CF_READ_NULL;
-		cs_shutr(cs);
+		sc_shutr(cs);
 	}
 
   out:
diff --git a/src/cli.c b/src/cli.c
index 685168b..d5e2d88 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -928,7 +928,7 @@
 			/* 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 @@
 		 * 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 @@
 		 * 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 @@
 		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
diff --git a/src/conn_stream.c b/src/conn_stream.c
index 4aabf1f..af40111 100644
--- a/src/conn_stream.c
+++ b/src/conn_stream.c
@@ -807,7 +807,7 @@
 		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 @@
 	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 @@
 
 		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 @@
 		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 @@
 	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 @@
 	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;
diff --git a/src/dns.c b/src/dns.c
index 69f16bc..749387e 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -764,8 +764,8 @@
 
 	return;
 close:
-	cs_shutw(cs);
-	cs_shutr(cs);
+	sc_shutw(cs);
+	sc_shutr(cs);
 	sc_ic(cs)->flags |= CF_READ_NULL;
 }
 
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index 53c8def..178cb18 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -1301,8 +1301,8 @@
 		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 @@
 			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 */
 
diff --git a/src/hlua.c b/src/hlua.c
index f84b9e0..7efdd63 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -1936,8 +1936,8 @@
 	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 @@
 		/* 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 @@
 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 @@
 	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 */
diff --git a/src/http_act.c b/src/http_act.c
index 95f6fde..51ba6cb 100644
--- a/src/http_act.c
+++ b/src/http_act.c
@@ -719,7 +719,7 @@
 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;
diff --git a/src/http_ana.c b/src/http_ana.c
index 303739e..cb7bbbf 100644
--- a/src/http_ana.c
+++ b/src/http_ana.c
@@ -4313,8 +4313,8 @@
 		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;
 
diff --git a/src/http_client.c b/src/http_client.c
index ee0c69a..fe4e1d6 100644
--- a/src/http_client.c
+++ b/src/http_client.c
@@ -238,8 +238,8 @@
 
 	/* 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 @@
 	return;
 
 end:
-	cs_shutw(cs);
-	cs_shutr(cs);
+	sc_shutw(cs);
+	sc_shutr(cs);
 	return;
 }
 
diff --git a/src/log.c b/src/log.c
index 35b7597..25eff5e 100644
--- a/src/log.c
+++ b/src/log.c
@@ -3680,8 +3680,8 @@
 	_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;
 
diff --git a/src/peers.c b/src/peers.c
index ae650a6..1fc08e7 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -3127,8 +3127,8 @@
 					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;
 			}
diff --git a/src/sink.c b/src/sink.c
index 4f39c05..792eb64 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -426,8 +426,8 @@
 	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 @@
 	return;
 
 close:
-	cs_shutw(cs);
-	cs_shutr(cs);
+	sc_shutw(cs);
+	sc_shutr(cs);
 	sc_ic(cs)->flags |= CF_READ_NULL;
 }
 
diff --git a/src/stats.c b/src/stats.c
index cd9dd45..c1fedaa 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -4356,7 +4356,7 @@
 	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 */
diff --git a/src/stream.c b/src/stream.c
index b141f17..686f116 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -936,7 +936,7 @@
 		 * 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 @@
 
 		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 @@
 	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 @@
 
 	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 @@
 		     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 @@
 	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 @@
 	/* 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 @@
 	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 ||
diff --git a/src/tcp_rules.c b/src/tcp_rules.c
index f9656c0..8b9aa76 100644
--- a/src/tcp_rules.c
+++ b/src/tcp_rules.c
@@ -254,7 +254,7 @@
 		_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 @@
 			}
 			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 @@
 		_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);