From: phk Date: Thu, 7 Feb 2008 09:33:30 +0000 (+0000) Subject: Use the correct ident (nuke the other one) and do only one dns lookup. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b7fa34916291e2e526336c21aa3d640c35ceb17;p=varnish Use the correct ident (nuke the other one) and do only one dns lookup. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2439 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_backend.c b/varnish-cache/bin/varnishd/cache_backend.c index efd809de..efec4107 100644 --- a/varnish-cache/bin/varnishd/cache_backend.c +++ b/varnish-cache/bin/varnishd/cache_backend.c @@ -59,7 +59,6 @@ struct backend { int refcount; pthread_mutex_t mtx; - const char *ident; struct addrinfo *ai; struct addrinfo *last_ai; @@ -519,7 +518,7 @@ VBE_AddBackend(struct cli *cli, const struct vrt_backend *vb) 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 @@ VBE_AddBackend(struct cli *cli, const struct vrt_backend *vb) b->last_check = TIM_mono(); - vbe_dns_lookup(cli, b); - VTAILQ_INSERT_TAIL(&backendlist, b, list); return (b); }