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/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.