r5533 - trunk/varnish-cache/lib/libvcl

phk at varnish-cache.org phk at varnish-cache.org
Thu Nov 11 10:12:46 CET 2010


Author: phk
Date: 2010-11-11 10:12:46 +0100 (Thu, 11 Nov 2010)
New Revision: 5533

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_compile.c
   trunk/varnish-cache/lib/libvcl/vcc_vmod.c
Log:
Make the vmod_dir facility actually work.



Modified: trunk/varnish-cache/lib/libvcl/vcc_compile.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_compile.c	2010-11-10 20:11:40 UTC (rev 5532)
+++ trunk/varnish-cache/lib/libvcl/vcc_compile.c	2010-11-11 09:12:46 UTC (rev 5533)
@@ -471,6 +471,7 @@
 	if (tl0 != NULL) {
 		REPLACE(tl->default_vcl, tl0->default_vcl);
 		REPLACE(tl->vcl_dir, tl0->vcl_dir);
+		REPLACE(tl->vmod_dir, tl0->vmod_dir);
 		tl->vars = tl0->vars;
 		tl->err_unref = tl0->err_unref;
 	} else {

Modified: trunk/varnish-cache/lib/libvcl/vcc_vmod.c
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_vmod.c	2010-11-10 20:11:40 UTC (rev 5532)
+++ trunk/varnish-cache/lib/libvcl/vcc_vmod.c	2010-11-11 09:12:46 UTC (rev 5533)
@@ -87,13 +87,18 @@
 	sym->def_e = tl->t;
 
 	if (tl->t->tok == ID) {
+		if (!vcc_IdIs(tl->t, "from")) {
+			vsb_printf(tl->sb, "Expected 'from path...' at ");
+			vcc_ErrToken(tl, tl->t);
+			vcc_ErrWhere(tl, tl->t);
+			return;
+		}
 		vcc_NextToken(tl);
 		ExpectErr(tl, CSTR);
 		bprintf(fn, "%s", tl->t->dec);
 		vcc_NextToken(tl);
 	} else {
-		Fi(tl, 0, ", NULL);\n");
-		bprintf(fn, "XXX: %s", "XXX: no default path");
+		bprintf(fn, "%s/libvmod_%.*s.so.1", tl->vmod_dir, PF(mod));
 	}
 
 	Fh(tl, 0, "static void *VGC_vmod_%.*s;\n", PF(mod));




More information about the varnish-commit mailing list