r1312 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Wed Apr 11 11:09:00 CEST 2007
Author: phk
Date: 2007-04-11 11:09:00 +0200 (Wed, 11 Apr 2007)
New Revision: 1312
Modified:
trunk/varnish-cache/bin/varnishd/mgt_vcc.c
trunk/varnish-cache/bin/varnishd/varnishd.c
Log:
Remember to initialize C_flag and don't exit in far away code.
Modified: trunk/varnish-cache/bin/varnishd/mgt_vcc.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-04-09 21:08:21 UTC (rev 1311)
+++ trunk/varnish-cache/bin/varnishd/mgt_vcc.c 2007-04-11 09:09:00 UTC (rev 1312)
@@ -315,14 +315,14 @@
if (C_flag) {
csrc = VCC_Compile(sb, buf, NULL);
fputs(csrc, stdout);
- exit (0);
+ return (0);
}
vf = mgt_VccCompile(sb, buf, NULL);
free(buf);
} else if (C_flag) {
csrc = VCC_CompileFile(sb, f_arg);
fputs(csrc, stdout);
- exit (0);
+ return (0);
} else {
vf = mgt_VccCompileFile(sb, f_arg);
}
Modified: trunk/varnish-cache/bin/varnishd/varnishd.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/varnishd.c 2007-04-09 21:08:21 UTC (rev 1311)
+++ trunk/varnish-cache/bin/varnishd/varnishd.c 2007-04-11 09:09:00 UTC (rev 1312)
@@ -398,7 +398,7 @@
const char *h_flag = "classic";
const char *s_arg = "file";
const char *T_arg = NULL;
- unsigned C_flag;
+ unsigned C_flag = 0;
char *p;
struct params param;
struct cli cli[1];
@@ -501,6 +501,8 @@
if (mgt_vcc_default(b_arg, f_arg, C_flag))
exit (2);
+ if (C_flag)
+ exit (0);
setup_storage(s_arg);
setup_hash(h_flag);
More information about the varnish-commit
mailing list