mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-19 01:54:37 +00:00
MINOR: cli: make "show fd" also report the xprt and xprt_ctx
These ones are definitely missing from some dumps, let's report them! We print the xprt's name instead of its useless pointer, as well as its ctx when xprt is not NULL.
This commit is contained in:
parent
eb0595d039
commit
37be953424
@ -1032,7 +1032,9 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
|
|||||||
const struct proxy *px = NULL;
|
const struct proxy *px = NULL;
|
||||||
const struct connection *conn = NULL;
|
const struct connection *conn = NULL;
|
||||||
const struct mux_ops *mux = NULL;
|
const struct mux_ops *mux = NULL;
|
||||||
|
const struct xprt_ops *xprt = NULL;
|
||||||
const void *ctx = NULL;
|
const void *ctx = NULL;
|
||||||
|
const void *xprt_ctx = NULL;
|
||||||
uint32_t conn_flags = 0;
|
uint32_t conn_flags = 0;
|
||||||
int is_back = 0;
|
int is_back = 0;
|
||||||
|
|
||||||
@ -1052,6 +1054,8 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
|
|||||||
conn_flags = conn->flags;
|
conn_flags = conn->flags;
|
||||||
mux = conn->mux;
|
mux = conn->mux;
|
||||||
ctx = conn->ctx;
|
ctx = conn->ctx;
|
||||||
|
xprt = conn->xprt;
|
||||||
|
xprt_ctx = conn->xprt_ctx;
|
||||||
li = objt_listener(conn->target);
|
li = objt_listener(conn->target);
|
||||||
sv = objt_server(conn->target);
|
sv = objt_server(conn->target);
|
||||||
px = objt_proxy(conn->target);
|
px = objt_proxy(conn->target);
|
||||||
@ -1100,6 +1104,10 @@ static int cli_io_handler_show_fd(struct appctx *appctx)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
chunk_appendf(&trash, " nomux");
|
chunk_appendf(&trash, " nomux");
|
||||||
|
|
||||||
|
chunk_appendf(&trash, " xprt=%s", xprt ? xprt->name : "");
|
||||||
|
if (xprt)
|
||||||
|
chunk_appendf(&trash, " xprt_ctx=%p", xprt_ctx);
|
||||||
}
|
}
|
||||||
else if (fdt.iocb == sock_accept_iocb) {
|
else if (fdt.iocb == sock_accept_iocb) {
|
||||||
chunk_appendf(&trash, ") l.st=%s fe=%s",
|
chunk_appendf(&trash, ") l.st=%s fe=%s",
|
||||||
|
Loading…
Reference in New Issue
Block a user