r3726 - branches/2.0/varnish-cache/bin/varnishd

tfheen at projects.linpro.no tfheen at projects.linpro.no
Tue Feb 10 16:06:32 CET 2009


Author: tfheen
Date: 2009-02-10 16:06:31 +0100 (Tue, 10 Feb 2009)
New Revision: 3726

Modified:
   branches/2.0/varnish-cache/bin/varnishd/cache_vrt.c
Log:
Merge r3544: Lack of a backend name is no reasonable cause for a panic.



Modified: branches/2.0/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- branches/2.0/varnish-cache/bin/varnishd/cache_vrt.c	2009-02-10 15:01:28 UTC (rev 3725)
+++ branches/2.0/varnish-cache/bin/varnishd/cache_vrt.c	2009-02-10 15:06:31 UTC (rev 3726)
@@ -697,9 +697,10 @@
 const char *
 VRT_backend_string(struct sess *sp)
 {
-       CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
-       CHECK_OBJ_NOTNULL(sp->director, DIRECTOR_MAGIC);
-       return (sp->director->vcl_name);
+	CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
+	if (sp->director == NULL)
+		return (NULL);
+	return (sp->director->vcl_name);
 }
 
 /*--------------------------------------------------------------------*/



More information about the varnish-commit mailing list