]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
From: Arjan de Vet <Arjan.deVet@nl.cis.philips.com>
authorwessels <>
Sat, 2 Nov 1996 01:19:08 +0000 (01:19 +0000)
committerwessels <>
Sat, 2 Nov 1996 01:19:08 +0000 (01:19 +0000)
In ipcache_gethostbyname the following patch should be applied to
avoid lookups for IP numbers being counted as misses. My hit/miss
ratio was very strange before I applied this patch :-).

src/ipcache.cc

index f203becb2dacdb2d4ffa2db0e6465b9a26234f2a..a5c5beda0644d9af4e0e4b8f7e09c8e4cfded473 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ipcache.cc,v 1.80 1996/10/30 18:43:22 wessels Exp $
+ * $Id: ipcache.cc,v 1.81 1996/11/01 18:19:08 wessels Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -819,9 +819,9 @@ ipcache_gethostbyname(char *name, int flags)
            return &i->addrs;
        }
     }
-    IpcacheStats.misses++;
     if ((addrs = ipcacheCheckNumeric(name)))
        return addrs;
+    IpcacheStats.misses++;
     if (BIT_TEST(flags, IP_BLOCKING_LOOKUP)) {
        IpcacheStats.ghbn_calls++;
        debug(14, 3, "ipcache_gethostbyname: blocking on gethostbyname() for '%s'\n", name);