]> err.no Git - varnish/commitdiff
Use the correct ident (nuke the other one) and do only one dns lookup.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 7 Feb 2008 09:33:30 +0000 (09:33 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Thu, 7 Feb 2008 09:33:30 +0000 (09:33 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2439 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_backend.c

index efd809dedccfb5bef93fcb27b49958d9749ef993..efec4107efadcfd19bd25806da07856c2d7c21df 100644 (file)
@@ -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);
 }