]> err.no Git - varnish/commitdiff
Move cli_func_ping to common_cli
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 4 Aug 2006 07:20:49 +0000 (07:20 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 4 Aug 2006 07:20:49 +0000 (07:20 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@632 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_cli.c
varnish-cache/bin/varnishd/common_cli.c
varnish-cache/bin/varnishd/common_cli.h

index e864483c6dd1605819ff7dc4184e8b5351347d65..40f351466c68f59e76d300d67b2da143ed146d12 100644 (file)
 
 /*--------------------------------------------------------------------*/
 
-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
index 2ff16d522c4738370ff57ef11d479222ab791ae9..71f70c6d35dfe15ba63c7a54d2e51c19cb4540b3 100644 (file)
@@ -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 @@ cli_readres(int fd, unsigned *status, char **ptr)
                *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);
+}
index fedeaaa83764eb713498b6732626221db35f77fc..8975c1d2fe880f7cd45807cd95889a1da77b2bc3 100644 (file)
@@ -15,3 +15,5 @@ void cli_resume(struct cli *cli);
 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;