r4406 - branches/2.0/varnish-cache/bin/varnishd
tfheen at projects.linpro.no
tfheen at projects.linpro.no
Wed Dec 16 11:45:45 CET 2009
Author: tfheen
Date: 2009-12-16 11:45:45 +0100 (Wed, 16 Dec 2009)
New Revision: 4406
Modified:
branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.c
Log:
Merge r4369: Add a debug.listen_address cli command to report the actual listen address(es)
Modified: branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.c 2009-12-16 10:45:39 UTC (rev 4405)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_acceptor.c 2009-12-16 10:45:45 UTC (rev 4406)
@@ -351,16 +351,46 @@
VSL(SLT_Debug, 0, "Acceptor is %s", vca_act->name);
}
+/*--------------------------------------------------------------------*/
+
+static void
+ccf_listen_address(struct cli *cli, const char * const *av, void *priv)
+{
+ struct listen_sock *ls;
+ char h[32], p[32];
+
+ (void)cli;
+ (void)av;
+ (void)priv;
+ VTAILQ_FOREACH(ls, &heritage.socks, list) {
+ if (ls->sock < 0)
+ continue;
+ TCP_myname(ls->sock, h, sizeof h, p, sizeof p);
+ cli_out(cli, "%s %s\n", h, p);
+ }
+}
+
+/*--------------------------------------------------------------------*/
+
static struct cli_proto vca_cmds[] = {
{ CLI_SERVER_START, ccf_start },
{ NULL }
};
+static struct cli_proto vca_debug_cmds[] = {
+ { "debug.listen_address",
+ "debug.listen_address",
+ "Report the actual listen address\n", 0, 0,
+ ccf_listen_address, NULL },
+ { NULL }
+};
+
void
VCA_Init(void)
{
CLI_AddFuncs(MASTER_CLI, vca_cmds);
+ CLI_AddFuncs(DEBUG_CLI, vca_debug_cmds);
}
void
More information about the varnish-commit
mailing list