Commit 8b6f733e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Remove old cli related stuff, it now lives elsewhere



git-svn-id: http://www.varnish-cache.org/svn/trunk@635 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 5785b788
......@@ -73,33 +73,6 @@ static const char *default_vcl =
struct heritage heritage;
#if 0
/*--------------------------------------------------------------------
* Generic passthrough for CLI functions
*/
static void
cli_passthrough_cb(unsigned u, const char *r, void *priv)
{
struct cli *cli = priv;
cli_out(cli, "%s\n", r);
cli_result(cli, u);
cli_resume(cli);
}
static void
m_cli_func_passthrough(struct cli *cli, char **av, void *priv)
{
(void)av;
(void)priv;
cli_suspend(cli);
mgt_child_request(cli_passthrough_cb, cli, &av[2], av[1]);
}
#endif
/*--------------------------------------------------------------------*/
static char *
......@@ -215,122 +188,6 @@ vcl_file(const char *fflag)
return (vf);
}
#if 0
/*--------------------------------------------------------------------*/
static void
m_cli_func_server_start(struct cli *cli, char **av, void *priv)
{
(void)cli;
(void)av;
(void)priv;
mgt_child_start();
}
/*--------------------------------------------------------------------*/
static void
m_cli_func_server_stop(struct cli *cli, char **av, void *priv)
{
(void)cli;
(void)av;
(void)priv;
mgt_child_stop();
}
/*--------------------------------------------------------------------*/
static void
m_cli_func_exit(struct cli *cli, char **av, void *priv)
{
(void)cli;
(void)av;
(void)priv;
mgt_child_kill();
exit (0);
}
/*--------------------------------------------------------------------*/
static void
m_cli_func_verbose(struct cli *cli, char **av, void *priv)
{
(void)av;
(void)priv;
cli->verbose = !cli->verbose;
}
static void
m_cli_func_ping(struct cli *cli, char **av, void *priv)
{
time_t t;
(void)priv;
if (av[2] != NULL) {
cli_out(cli, "Got your %s\n", av[2]);
}
t = time(NULL);
cli_out(cli, "PONG %ld\n", t);
}
/*--------------------------------------------------------------------*/
static void
m_cli_func_stats(struct cli *cli, char **av, void *priv)
{
(void)av;
(void)priv;
assert (VSL_stats != NULL);
#define MAC_STAT(n,t,f,d) \
cli_out(cli, "%12ju " d "\n", (VSL_stats->n));
#include "stat_field.h"
#undef MAC_STAT
}
/*--------------------------------------------------------------------*/
static struct cli_proto cli_proto[] = {
/* URL manipulation */
{ CLI_URL_QUERY, m_cli_func_passthrough, NULL },
{ CLI_URL_PURGE, m_cli_func_passthrough, NULL },
{ CLI_URL_STATUS, m_cli_func_passthrough, NULL },
{ CLI_CONFIG_LOAD, m_cli_func_config_load, NULL },
{ CLI_CONFIG_INLINE, m_cli_func_config_inline, NULL },
{ CLI_CONFIG_UNLOAD, m_cli_func_passthrough, NULL },
{ CLI_CONFIG_LIST, m_cli_func_passthrough, NULL },
{ CLI_CONFIG_USE, m_cli_func_passthrough, NULL },
{ CLI_SERVER_FREEZE, m_cli_func_passthrough, NULL },
{ CLI_SERVER_THAW, m_cli_func_passthrough, NULL },
{ CLI_SERVER_SUSPEND, m_cli_func_passthrough, NULL },
{ CLI_SERVER_RESUME, m_cli_func_passthrough, NULL },
{ CLI_SERVER_STOP, m_cli_func_server_stop, NULL },
{ CLI_SERVER_START, m_cli_func_server_start, NULL },
{ CLI_SERVER_RESTART },
{ CLI_PING, m_cli_func_ping, NULL },
{ CLI_STATS, m_cli_func_stats, NULL },
{ CLI_ZERO },
{ CLI_HELP, cli_func_help, cli_proto },
{ CLI_VERBOSE, m_cli_func_verbose, NULL },
{ CLI_EXIT, m_cli_func_exit, NULL},
{ CLI_QUIT },
{ CLI_BYE },
{ NULL }
};
#endif
/*--------------------------------------------------------------------*/
static int
......
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