]> err.no Git - varnish/commitdiff
Remove old cli related stuff, it now lives elsewhere
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 4 Aug 2006 09:06:40 +0000 (09:06 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 4 Aug 2006 09:06:40 +0000 (09:06 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@635 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/varnishd.c

index a7d5e407eca1cbfc3f59373a2c1f00038ffe9574..d5679311202bae68fa7fecc35e7229185fc7cc75 100644 (file)
@@ -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