r2439 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Thu Feb 7 10:33:31 CET 2008


Author: phk
Date: 2008-02-07 10:33:30 +0100 (Thu, 07 Feb 2008)
New Revision: 2439

Modified:
   trunk/varnish-cache/bin/varnishd/cache_backend.c
Log:
Use the correct ident (nuke the other one) and do only one dns lookup.


Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend.c	2008-02-07 01:40:15 UTC (rev 2438)
+++ trunk/varnish-cache/bin/varnishd/cache_backend.c	2008-02-07 09:33:30 UTC (rev 2439)
@@ -59,7 +59,6 @@
 	int			refcount;
 	pthread_mutex_t		mtx;
 
-	const char 		*ident;
 	struct addrinfo		*ai;
 	struct addrinfo		*last_ai;
 
@@ -519,7 +518,7 @@
 	ASSERT_CLI();
 	VTAILQ_FOREACH(b, &backendlist, list) {
 		CHECK_OBJ_NOTNULL(b, BACKEND_MAGIC);
-		if (strcmp(b->ident, vb->ident))
+		if (strcmp(b->vrt->ident, vb->ident))
 			continue;
 		b->refcount++;
 		return (b);
@@ -549,8 +548,6 @@
 
 	b->last_check = TIM_mono();
 
-	vbe_dns_lookup(cli, b);
-
 	VTAILQ_INSERT_TAIL(&backendlist, b, list);
 	return (b);
 }




More information about the varnish-commit mailing list