/* cache_ban.c */
void AddBan(const char *, int hash);
void BAN_Init(void);
-void cli_func_url_purge(struct cli *cli, char **av, void *priv);
-void cli_func_hash_purge(struct cli *cli, char **av, void *priv);
+void cli_func_url_purge(struct cli *cli, const char * const *av, void *priv);
+void cli_func_hash_purge(struct cli *cli, const char * const *av, void *priv);
void BAN_NewObj(struct object *o);
int BAN_CheckObject(struct object *o, const char *url, const char *hash);
}
void
-cli_func_url_purge(struct cli *cli, char **av, void *priv)
+cli_func_url_purge(struct cli *cli, const char * const *av, void *priv)
{
(void)priv;
}
void
-cli_func_hash_purge(struct cli *cli, char **av, void *priv)
+cli_func_hash_purge(struct cli *cli, const char * const *av, void *priv)
{
(void)priv;
/*--------------------------------------------------------------------*/
static void
-cli_func_start(struct cli *cli, char **av, void *priv)
+cli_func_start(struct cli *cli, const char * const *av, void *priv)
{
(void)cli;
/*--------------------------------------------------------------------*/
void
-cli_func_dump_pool(struct cli *cli, char **av, void *priv)
+cli_func_dump_pool(struct cli *cli, const char * const *av, void *priv)
{
(void)cli;
/*--------------------------------------------------------------------*/
void
-cli_func_config_list(struct cli *cli, char **av, void *priv)
+cli_func_config_list(struct cli *cli, const char * const *av, void *priv)
{
struct vcls *vcl;
}
void
-cli_func_config_load(struct cli *cli, char **av, void *priv)
+cli_func_config_load(struct cli *cli, const char * const *av, void *priv)
{
(void)av;
}
void
-cli_func_config_discard(struct cli *cli, char **av, void *priv)
+cli_func_config_discard(struct cli *cli, const char * const *av, void *priv)
{
struct vcls *vcl;
}
void
-cli_func_config_use(struct cli *cli, char **av, void *priv)
+cli_func_config_use(struct cli *cli, const char * const *av, void *priv)
{
struct vcls *vcl;
/*--------------------------------------------------------------------*/
void
-mcf_server_startstop(struct cli *cli, char **av, void *priv)
+mcf_server_startstop(struct cli *cli, const char * const *av, void *priv)
{
(void)av;
/*--------------------------------------------------------------------*/
void
-mcf_server_status(struct cli *cli, char **av, void *priv)
+mcf_server_status(struct cli *cli, const char * const *av, void *priv)
{
(void)av;
(void)priv;
/*--------------------------------------------------------------------*/
static void
-mcf_stats(struct cli *cli, char **av, void *priv)
+mcf_stats(struct cli *cli, const char * const *av, void *priv)
{
(void)av;
*/
static void
-mcf_passthru(struct cli *cli, char **av, void *priv)
+mcf_passthru(struct cli *cli, const char * const *av, void *priv)
{
struct vsb *sb;
- char *p;
+ const char *p;
+ char *q;
unsigned u;
int i;
xxxassert(i == vsb_len(sb));
vsb_delete(sb);
- i = cli_readres(cli_i, &u, &p, params->cli_timeout);
+ i = cli_readres(cli_i, &u, &q, params->cli_timeout);
cli_result(cli, u);
- cli_out(cli, "%s", p);
- free(p);
+ cli_out(cli, "%s", q);
+ free(q);
}
/*--------------------------------------------------------------------*/
void
-mcf_param_show(struct cli *cli, char **av, void *priv)
+mcf_param_show(struct cli *cli, const char * const *av, void *priv)
{
struct parspec *pp;
const char *p, *q;
/*--------------------------------------------------------------------*/
void
-mcf_param_set(struct cli *cli, char **av, void *priv)
+mcf_param_set(struct cli *cli, const char * const *av, void *priv)
{
(void)priv;
/*--------------------------------------------------------------------*/
void
-mcf_config_inline(struct cli *cli, char **av, void *priv)
+mcf_config_inline(struct cli *cli, const char * const *av, void *priv)
{
char *vf, *p;
struct vsb *sb;
}
void
-mcf_config_load(struct cli *cli, char **av, void *priv)
+mcf_config_load(struct cli *cli, const char * const *av, void *priv)
{
char *vf;
struct vsb *sb;
}
void
-mcf_config_use(struct cli *cli, char **av, void *priv)
+mcf_config_use(struct cli *cli, const char * const *av, void *priv)
{
unsigned status;
char *p;
}
void
-mcf_config_discard(struct cli *cli, char **av, void *priv)
+mcf_config_discard(struct cli *cli, const char * const *av, void *priv)
{
unsigned status;
char *p;
}
void
-mcf_config_list(struct cli *cli, char **av, void *priv)
+mcf_config_list(struct cli *cli, const char * const *av, void *priv)
{
unsigned status;
char *p;
* XXX: This should take an option argument to show all (include) files
*/
void
-mcf_config_show(struct cli *cli, char **av, void *priv)
+mcf_config_show(struct cli *cli, const char * const *av, void *priv)
{
struct vclprog *vp;
void *dlh, *sym;
struct cli; /* NB: struct cli is opaque at this level. */
-typedef void cli_func_t(struct cli*, char **av, void *priv);
+typedef void cli_func_t(struct cli*, const char * const *av, void *priv);
struct cli_proto {
/* These must match the CLI_* macros in cli.h */
*/
void
-cli_func_help(struct cli *cli, char **av, void *priv)
+cli_func_help(struct cli *cli, const char * const *av, void *priv)
{
struct cli_proto *cp;
break;
}
- cp->func(cli, av, cp->priv);
+ cp->func(cli, (const char * const *)av, cp->priv);
} while (0);
FreeArgv(av);
/*--------------------------------------------------------------------*/
void
-cli_func_ping(struct cli *cli, char **av, void *priv)
+cli_func_ping(struct cli *cli, const char * const *av, void *priv)
{
time_t t;