MINOR: cli: give the show_fd helpers the ability to report a suspicious entry

Now the show_fd helpers at the transport and mux levels return an integer
which indicates whether or not the inspected entry looks suspicious. When
an entry is reported as suspicious, "show fd" will suffix it with an
exclamation mark ('!') in the dump, that is supposed to help detecting
them.

For now, helpers were adjusted to adapt to the new API but none of them
reports any suspicious entry yet.

(cherry picked from commit 8050efeacb554f798a49db5ef213c8f673e5596e)
Signed-off-by: Willy Tarreau <w@1wt.eu>
diff --git a/src/cli.c b/src/cli.c
index 5ada692..47b28fc 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -1037,6 +1037,7 @@
 		const void *xprt_ctx = NULL;
 		uint32_t conn_flags = 0;
 		int is_back = 0;
+		int suspicious = 0;
 
 		fdt = fdtab[fd];
 
@@ -1100,7 +1101,7 @@
 			if (mux) {
 				chunk_appendf(&trash, " mux=%s ctx=%p", mux->name, ctx);
 				if (mux->show_fd)
-					mux->show_fd(&trash, fdt.owner);
+					suspicious |= mux->show_fd(&trash, fdt.owner);
 			}
 			else
 				chunk_appendf(&trash, " nomux");
@@ -1110,7 +1111,7 @@
 				if (xprt_ctx || xprt->show_fd)
 					chunk_appendf(&trash, " xprt_ctx=%p", xprt_ctx);
 				if (xprt->show_fd)
-					xprt->show_fd(&trash, conn, xprt_ctx);
+					suspicious |= xprt->show_fd(&trash, conn, xprt_ctx);
 			}
 		}
 		else if (fdt.iocb == sock_accept_iocb) {
@@ -1124,7 +1125,7 @@
 #ifdef DEBUG_FD
 		chunk_appendf(&trash, " evcnt=%u", fdtab[fd].event_count);
 #endif
-		chunk_appendf(&trash, "\n");
+		chunk_appendf(&trash, "%s\n", suspicious ? " !" : "");
 
 		if (ci_putchk(si_ic(si), &trash) == -1) {
 			si_rx_room_blk(si);
diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c
index cea28a5..9efb96c 100644
--- a/src/mux_fcgi.c
+++ b/src/mux_fcgi.c
@@ -4051,7 +4051,7 @@
 }
 
 /* for debugging with CLI's "show fd" command */
-static void fcgi_show_fd(struct buffer *msg, struct connection *conn)
+static int fcgi_show_fd(struct buffer *msg, struct connection *conn)
 {
 	struct fcgi_conn *fconn = conn->ctx;
 	struct fcgi_strm *fstrm = NULL;
@@ -4062,7 +4062,7 @@
 	struct buffer *hmbuf, *tmbuf;
 
 	if (!fconn)
-		return;
+		return 0;
 
 	list_for_each_entry(fstrm, &fconn->send_list, send_list)
 		send_cnt++;
@@ -4114,6 +4114,7 @@
 			}
 		}
 	}
+	return 0;
 }
 
 /* Migrate the the connection to the current thread.
diff --git a/src/mux_h1.c b/src/mux_h1.c
index ffed543..7b07bb7 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -2896,7 +2896,7 @@
 }
 
 /* for debugging with CLI's "show fd" command */
-static void h1_show_fd(struct buffer *msg, struct connection *conn)
+static int h1_show_fd(struct buffer *msg, struct connection *conn)
 {
 	struct h1c *h1c = conn->ctx;
 	struct h1s *h1s = h1c->h1s;
@@ -2936,6 +2936,7 @@
 			}
 		}
 	}
+	return 0;
 }
 
 
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 044f2ac..c8a93d1 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -6197,7 +6197,7 @@
 }
 
 /* for debugging with CLI's "show fd" command */
-static void h2_show_fd(struct buffer *msg, struct connection *conn)
+static int h2_show_fd(struct buffer *msg, struct connection *conn)
 {
 	struct h2c *h2c = conn->ctx;
 	struct h2s *h2s = NULL;
@@ -6209,7 +6209,7 @@
 	struct buffer *hmbuf, *tmbuf;
 
 	if (!h2c)
-		return;
+		return 0;
 
 	list_for_each_entry(h2s, &h2c->fctl_list, list)
 		fctl_cnt++;
@@ -6267,6 +6267,7 @@
 			}
 		}
 	}
+	return 0;
 }
 
 /* Migrate the the connection to the current thread.
diff --git a/src/ssl_sock.c b/src/ssl_sock.c
index 4b4ab21..8f3159f 100644
--- a/src/ssl_sock.c
+++ b/src/ssl_sock.c
@@ -6249,12 +6249,12 @@
 /* "show fd" helper to dump ssl internals. Warning: the output buffer is often
  * the common trash!
  */
-static void ssl_sock_show_fd(struct buffer *buf, const struct connection *conn, const void *ctx)
+static int ssl_sock_show_fd(struct buffer *buf, const struct connection *conn, const void *ctx)
 {
 	const struct ssl_sock_ctx *sctx = ctx;
 
 	if (!sctx)
-		return;
+		return 0;
 
 	if (sctx->conn != conn)
 		chunk_appendf(&trash, " xctx.conn=%p(BOGUS!)", sctx->conn);
@@ -6278,6 +6278,7 @@
 	}
 	chunk_appendf(&trash, " .sent_early=%d", sctx->sent_early_data);
 	chunk_appendf(&trash, " .early_in=%d", (int)sctx->early_buf.data);
+	return 0;
 }
 
 /* This function is used with TLS ticket keys management. It permits to browse