MINOR: stream-int/conn-stream: Report error to the CS instead of the SI

SI_FL_ERR is removed and replaced by CS_FL_ERROR. It is a transient patch
because the idea is to rely on the endpoint to handle errors at this
level. But if for any reason it is not possible, the stream-interface flags
will still be replaced.
diff --git a/src/backend.c b/src/backend.c
index 2d7d91d..7250aa9 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -1741,11 +1741,11 @@
 
 	/* Now handle synchronously connected sockets. We know the stream-int
 	 * is at least in state SI_ST_CON. These ones typically are UNIX
-	 * sockets, socket pairs, and occasionally TCP connections on the
+	 * sockets, socket pairs, andoccasionally TCP connections on the
 	 * loopback on a heavily loaded system.
 	 */
 	if ((srv_conn->flags & CO_FL_ERROR || s->csb->endp->flags & CS_EP_ERROR))
-		cs_si(s->csb)->flags |= SI_FL_ERR;
+		s->csb->flags |= CS_FL_ERR;
 
 	/* If we had early data, and the handshake ended, then
 	 * we can remove the flag, and attempt to wake the task up,
@@ -1964,7 +1964,7 @@
 		 * allocation problem, so we want to retry now.
 		 */
 		cs->si->state = SI_ST_CER;
-		cs->si->flags &= ~SI_FL_ERR;
+		cs->flags &= ~CS_FL_ERR;
 		back_handle_st_cer(s);
 
 		DBG_TRACE_STATE("connection error, retry", STRM_EV_STRM_PROC|STRM_EV_SI_ST|STRM_EV_STRM_ERR, s);
@@ -2187,9 +2187,9 @@
 
  done:
 	/* retryable error ? */
-	if ((s->flags & SF_CONN_EXP) || (cs->si->flags & SI_FL_ERR)) {
+	if ((s->flags & SF_CONN_EXP) || (cs->flags & CS_FL_ERR)) {
 		if (!cs->si->err_type) {
-			if (cs->si->flags & SI_FL_ERR)
+			if (cs->flags & CS_FL_ERR)
 				cs->si->err_type = SI_ET_CONN_ERR;
 			else
 				cs->si->err_type = SI_ET_CONN_TO;
@@ -2234,7 +2234,7 @@
 			_HA_ATOMIC_DEC(&__objt_server(s->target)->cur_sess);
 		}
 
-		if ((cs->si->flags & SI_FL_ERR) &&
+		if ((cs->flags & CS_FL_ERR) &&
 		    conn && conn->err_code == CO_ER_SSL_MISMATCH_SNI) {
 			/* We tried to connect to a server which is configured
 			 * with "verify required" and which doesn't have the
@@ -2291,7 +2291,7 @@
 	 * layers in an unexpected state (i.e < ST_CONN).
 	 *
 	 * Note: the stream-interface will be switched to ST_REQ, ST_ASS or
-	 * ST_TAR and SI_FL_ERR and SF_CONN_EXP flags will be unset.
+	 * ST_TAR and CS_FL_ERR and SF_CONN_EXP flags will be unset.
 	 */
 	if (cs_reset_endp(cs) < 0) {
 		if (!cs->si->err_type)
@@ -2319,7 +2319,7 @@
 
 	stream_choose_redispatch(s);
 
-	if (cs->si->flags & SI_FL_ERR) {
+	if (cs->flags & CS_FL_ERR) {
 		/* The error was an asynchronous connection error, and we will
 		 * likely have to retry connecting to the same server, most
 		 * likely leading to the same result. To avoid this, we wait
@@ -2345,7 +2345,7 @@
 			cs->si->state = SI_ST_TAR;
 			s->conn_exp = tick_add(now_ms, MS_TO_TICKS(delay));
 		}
-		cs->si->flags &= ~SI_FL_ERR;
+		cs->flags &= ~CS_FL_ERR;
 		DBG_TRACE_STATE("retry a new connection", STRM_EV_STRM_PROC|STRM_EV_SI_ST, s);
 	}
 
@@ -2401,7 +2401,7 @@
 		}
 
 		/* retryable error ? */
-		if (cs->si->flags & SI_FL_ERR) {
+		if (cs->flags & CS_FL_ERR) {
 			if (!cs->si->err_type)
 				cs->si->err_type = SI_ET_CONN_ERR;
 			cs->si->state = SI_ST_CER;