r5208 - trunk/varnish-cache/lib/libvarnishapi

martin at varnish-cache.org martin at varnish-cache.org
Tue Sep 14 13:31:59 CEST 2010


Author: martin
Date: 2010-09-14 13:31:59 +0200 (Tue, 14 Sep 2010)
New Revision: 5208

Modified:
   trunk/varnish-cache/lib/libvarnishapi/vsm.c
Log:
Initialize default varnish instance name in library if no n-argument has been given.

Fixes: #762


Modified: trunk/varnish-cache/lib/libvarnishapi/vsm.c
===================================================================
--- trunk/varnish-cache/lib/libvarnishapi/vsm.c	2010-09-14 11:06:33 UTC (rev 5207)
+++ trunk/varnish-cache/lib/libvarnishapi/vsm.c	2010-09-14 11:31:59 UTC (rev 5208)
@@ -147,6 +147,7 @@
 
 	CHECK_OBJ_NOTNULL(vd, VSM_MAGIC);
 	AZ(vd->vsm_head);
+	AN(vd->fname);
 
 	vd->vsm_fd = open(vd->fname, O_RDONLY);
 	if (vd->vsm_fd < 0) {
@@ -221,6 +222,8 @@
 
 	CHECK_OBJ_NOTNULL(vd, VSM_MAGIC);
 	AZ(vd->vsm_head);
+	if (!vd->n_opt)
+		VSM_n_Arg(vd, "");
 	return (vsm_open(vd, diag));
 }
 




More information about the varnish-commit mailing list