Commit 062a1d5e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Move cli_func_ping to common_cli



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@632 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 16800b6e
......@@ -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
......
......@@ -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);
}
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment