r3544 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Tue Jan 27 09:17:29 CET 2009


Author: phk
Date: 2009-01-27 09:17:29 +0100 (Tue, 27 Jan 2009)
New Revision: 3544

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



Modified: trunk/varnish-cache/bin/varnishd/cache_vrt.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vrt.c	2009-01-24 12:56:27 UTC (rev 3543)
+++ trunk/varnish-cache/bin/varnishd/cache_vrt.c	2009-01-27 08:17:29 UTC (rev 3544)
@@ -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