Commit 35d4c11f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Rename struct vcls to vclprog



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@655 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent fed98969
...@@ -23,15 +23,15 @@ ...@@ -23,15 +23,15 @@
#include "mgt.h" #include "mgt.h"
#include "mgt_cli.h" #include "mgt_cli.h"
struct vcls { struct vclprog {
TAILQ_ENTRY(vcls) list; TAILQ_ENTRY(vclprog) list;
char *name; char *name;
char *fname; char *fname;
int active; int active;
}; };
static TAILQ_HEAD(, vcls) vclhead = TAILQ_HEAD_INITIALIZER(vclhead); static TAILQ_HEAD(, vclprog) vclhead = TAILQ_HEAD_INITIALIZER(vclhead);
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
...@@ -75,10 +75,10 @@ static const char *default_vcl = ...@@ -75,10 +75,10 @@ static const char *default_vcl =
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
static struct vcls * static struct vclprog *
mgt_vcc_add(const char *name, char *file) mgt_vcc_add(const char *name, char *file)
{ {
struct vcls *vp; struct vclprog *vp;
vp = calloc(sizeof *vp, 1); vp = calloc(sizeof *vp, 1);
assert(vp != NULL); assert(vp != NULL);
...@@ -89,7 +89,7 @@ mgt_vcc_add(const char *name, char *file) ...@@ -89,7 +89,7 @@ mgt_vcc_add(const char *name, char *file)
} }
static void static void
mgt_vcc_del(struct vcls *vp) mgt_vcc_del(struct vclprog *vp)
{ {
TAILQ_REMOVE(&vclhead, vp, list); TAILQ_REMOVE(&vclhead, vp, list);
printf("unlink %s\n", vp->fname); printf("unlink %s\n", vp->fname);
...@@ -102,7 +102,7 @@ mgt_vcc_del(struct vcls *vp) ...@@ -102,7 +102,7 @@ mgt_vcc_del(struct vcls *vp)
static int static int
mgt_vcc_delbyname(const char *name) mgt_vcc_delbyname(const char *name)
{ {
struct vcls *vp; struct vclprog *vp;
TAILQ_FOREACH(vp, &vclhead, list) { TAILQ_FOREACH(vp, &vclhead, list) {
if (!strcmp(name, vp->name)) { if (!strcmp(name, vp->name)) {
...@@ -121,7 +121,7 @@ mgt_vcc_default(const char *bflag, const char *fflag) ...@@ -121,7 +121,7 @@ mgt_vcc_default(const char *bflag, const char *fflag)
char *buf, *vf; char *buf, *vf;
const char *p, *q; const char *p, *q;
struct sbuf *sb; struct sbuf *sb;
struct vcls *vp; struct vclprog *vp;
sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND);
assert(sb != NULL); assert(sb != NULL);
...@@ -172,7 +172,7 @@ mgt_vcc_default(const char *bflag, const char *fflag) ...@@ -172,7 +172,7 @@ mgt_vcc_default(const char *bflag, const char *fflag)
int int
mgt_push_vcls_and_start(int *status, char **p) mgt_push_vcls_and_start(int *status, char **p)
{ {
struct vcls *vp; struct vclprog *vp;
TAILQ_FOREACH(vp, &vclhead, list) { TAILQ_FOREACH(vp, &vclhead, list) {
if (mgt_cli_askchild(status, p, if (mgt_cli_askchild(status, p,
...@@ -194,7 +194,7 @@ static ...@@ -194,7 +194,7 @@ static
void void
mgt_vcc_atexit(void) mgt_vcc_atexit(void)
{ {
struct vcls *vp; struct vclprog *vp;
if (getpid() != mgt_pid) if (getpid() != mgt_pid)
return; return;
...@@ -277,10 +277,10 @@ mcf_config_load(struct cli *cli, char **av, void *priv) ...@@ -277,10 +277,10 @@ mcf_config_load(struct cli *cli, char **av, void *priv)
mgt_vcc_add(av[2], vf); mgt_vcc_add(av[2], vf);
} }
static struct vcls * static struct vclprog *
mcf_find_vcl(struct cli *cli, const char *name) mcf_find_vcl(struct cli *cli, const char *name)
{ {
struct vcls *vp; struct vclprog *vp;
TAILQ_FOREACH(vp, &vclhead, list) TAILQ_FOREACH(vp, &vclhead, list)
if (!strcmp(vp->name, name)) if (!strcmp(vp->name, name))
...@@ -297,7 +297,7 @@ mcf_config_use(struct cli *cli, char **av, void *priv) ...@@ -297,7 +297,7 @@ mcf_config_use(struct cli *cli, char **av, void *priv)
{ {
int status; int status;
char *p; char *p;
struct vcls *vp; struct vclprog *vp;
(void)priv; (void)priv;
vp = mcf_find_vcl(cli, av[2]); vp = mcf_find_vcl(cli, av[2]);
...@@ -323,7 +323,7 @@ mcf_config_discard(struct cli *cli, char **av, void *priv) ...@@ -323,7 +323,7 @@ mcf_config_discard(struct cli *cli, char **av, void *priv)
{ {
int status; int status;
char *p; char *p;
struct vcls *vp; struct vclprog *vp;
(void)priv; (void)priv;
vp = mcf_find_vcl(cli, av[2]); vp = mcf_find_vcl(cli, av[2]);
...@@ -347,7 +347,7 @@ mcf_config_list(struct cli *cli, char **av, void *priv) ...@@ -347,7 +347,7 @@ mcf_config_list(struct cli *cli, char **av, void *priv)
{ {
int status; int status;
char *p; char *p;
struct vcls *vp; struct vclprog *vp;
(void)av; (void)av;
(void)priv; (void)priv;
......
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