r632 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Aug 4 09:20:49 CEST 2006


Author: phk
Date: 2006-08-04 09:20:49 +0200 (Fri, 04 Aug 2006)
New Revision: 632

Modified:
   trunk/varnish-cache/bin/varnishd/cache_cli.c
   trunk/varnish-cache/bin/varnishd/common_cli.c
   trunk/varnish-cache/bin/varnishd/common_cli.h
Log:
Move cli_func_ping to common_cli



Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_cli.c	2006-08-04 07:19:51 UTC (rev 631)
+++ trunk/varnish-cache/bin/varnishd/cache_cli.c	2006-08-04 07:20:49 UTC (rev 632)
@@ -21,24 +21,6 @@
 
 /*--------------------------------------------------------------------*/
 
-static void
-cli_func_ping(struct cli *cli, char **av, void *priv)
-{
-	time_t t;
-
-	(void)priv;
-#if 0
-	arm_keepalive();
-#endif
-	if (av[2] != NULL) {
-		/* XXX: check clock skew is pointless here */
-	}
-	t = time(NULL);
-	cli_out(cli, "PONG %ld", t);
-}
-
-/*--------------------------------------------------------------------*/
-
 struct cli_proto CLI_cmds[] = {
 	{ CLI_PING,		cli_func_ping },
 #if 0

Modified: trunk/varnish-cache/bin/varnishd/common_cli.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/common_cli.c	2006-08-04 07:19:51 UTC (rev 631)
+++ trunk/varnish-cache/bin/varnishd/common_cli.c	2006-08-04 07:20:49 UTC (rev 632)
@@ -11,6 +11,7 @@
 #include <ctype.h>
 #include <stdlib.h>
 #include <unistd.h>
+#include <time.h>
 #include <signal.h>
 
 #include <sys/wait.h>
@@ -103,3 +104,16 @@
 		*ptr = p;
 	return (0);
 }
+
+/*--------------------------------------------------------------------*/
+
+void
+cli_func_ping(struct cli *cli, char **av, void *priv)
+{
+	time_t t;
+
+	(void)priv;
+	(void)av;
+	t = time(NULL);
+	cli_out(cli, "PONG %ld", t);
+}

Modified: trunk/varnish-cache/bin/varnishd/common_cli.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/common_cli.h	2006-08-04 07:19:51 UTC (rev 631)
+++ trunk/varnish-cache/bin/varnishd/common_cli.h	2006-08-04 07:20:49 UTC (rev 632)
@@ -15,3 +15,5 @@
 int cli_writeres(int fd, struct cli *cli);
 int cli_readres(int fd, unsigned *status, char **ptr);
 extern struct cli_proto CLI_cmds[];
+
+cli_func_t cli_func_ping;




More information about the varnish-commit mailing list