]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
make ipcache_purgelru() global
authorwessels <>
Wed, 21 Aug 1996 11:50:08 +0000 (11:50 +0000)
committerwessels <>
Wed, 21 Aug 1996 11:50:08 +0000 (11:50 +0000)
src/ipcache.cc

index 037b7627eb2ad21c1d6d0514f63195a8ea5b4a10..2b8738d04450c0467ea9c7d9fad80c0cfceb69a0 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: ipcache.cc,v 1.39 1996/08/19 22:44:53 wessels Exp $
+ * $Id: ipcache.cc,v 1.40 1996/08/21 05:50:08 wessels Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -145,7 +145,6 @@ static int ipcache_testname _PARAMS((void));
 static int ipcache_compareLastRef _PARAMS((ipcache_entry **, ipcache_entry **));
 static int ipcache_dnsHandleRead _PARAMS((int, dnsserver_t *));
 static int ipcache_parsebuffer _PARAMS((char *buf, unsigned int offset, dnsserver_t *));
-static int ipcache_purgelru _PARAMS((void));
 static void ipcache_release _PARAMS((ipcache_entry *));
 static ipcache_entry *ipcache_GetFirst _PARAMS((void));
 static ipcache_entry *ipcache_GetNext _PARAMS((void));
@@ -315,7 +314,7 @@ static int ipcacheExpiredEntry(i)
 }
 
 /* finds the LRU and deletes */
-static int ipcache_purgelru()
+int ipcache_purgelru()
 {
     ipcache_entry *i = NULL;
     int local_ip_count = 0;
@@ -1058,7 +1057,7 @@ void stat_ipcache_get(sentry)
        if (i->status == IP_PENDING || i->status == IP_DISPATCHED)
            ttl = 0;
        else
-           ttl = (i->ttl - squid_curtime + i->timestamp);
+           ttl = (i->ttl + i->timestamp - squid_curtime);
        storeAppendPrintf(sentry, " {%-32.32s %c %6d %d",
            i->name,
            ipcache_status_char[i->status],