r1355 - in branches/1.0: . bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Thu Apr 19 16:51:20 CEST 2007


Author: des
Date: 2007-04-19 16:51:20 +0200 (Thu, 19 Apr 2007)
New Revision: 1355

Modified:
   branches/1.0/
   branches/1.0/bin/varnishd/mgt_vcc.c
   branches/1.0/bin/varnishd/varnishd.c
Log:
 r37088 at cat (orig r1312):  phk | 2007-04-11 11:09:00 +0200
 Remember to initialize C_flag and don't exit in far away code.
 



Property changes on: branches/1.0
___________________________________________________________________
Name: svk:merge
   - d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1311
   + d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1312

Modified: branches/1.0/bin/varnishd/mgt_vcc.c
===================================================================
--- branches/1.0/bin/varnishd/mgt_vcc.c	2007-04-19 14:51:19 UTC (rev 1354)
+++ branches/1.0/bin/varnishd/mgt_vcc.c	2007-04-19 14:51:20 UTC (rev 1355)
@@ -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: branches/1.0/bin/varnishd/varnishd.c
===================================================================
--- branches/1.0/bin/varnishd/varnishd.c	2007-04-19 14:51:19 UTC (rev 1354)
+++ branches/1.0/bin/varnishd/varnishd.c	2007-04-19 14:51:20 UTC (rev 1355)
@@ -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