From: wessels <> Date: Fri, 12 Jul 1996 23:39:51 +0000 (+0000) Subject: -Remove ipcache_entry->lock X-Git-Tag: SQUID_3_0_PRE1~6072 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07a8ad49facf3ba055b6fc68d2485b1118a5e9c2;p=thirdparty%2Fsquid.git -Remove ipcache_entry->lock -Change displayed TTL in stats page --- diff --git a/src/ipcache.cc b/src/ipcache.cc index 6f9a95c761..4c9ae0aba8 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,5 +1,5 @@ /* - * $Id: ipcache.cc,v 1.30 1996/07/09 22:55:14 wessels Exp $ + * $Id: ipcache.cc,v 1.31 1996/07/12 17:39:51 wessels Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -369,13 +369,11 @@ static int ipcache_compareLastRef(e1, e2) static int ipcacheExpiredEntry(i) ipcache_entry *i; { - if (i->lock) - return 0; if (i->status == IP_PENDING) return 0; if (i->status == IP_DISPATCHED) return 0; - if (i->ttl + i->lastref > squid_curtime) + if (i->ttl + i->timestamp > squid_curtime) return 0; return 1; } @@ -414,8 +412,6 @@ static int ipcache_purgelru() continue; if (i->status == IP_DISPATCHED) continue; - if (i->lock) - continue; local_ip_notpending_count++; LRU_list[LRU_list_count++] = i; } @@ -1247,11 +1243,10 @@ void stat_ipcache_get(sentry) if (i->status == IP_PENDING || i->status == IP_DISPATCHED) ttl = 0; else - ttl = (i->ttl - squid_curtime + i->lastref); - storeAppendPrintf(sentry, " {%-32.32s %c%c %6d %d", + ttl = (i->ttl - squid_curtime + i->timestamp); + storeAppendPrintf(sentry, " {%-32.32s %c %6d %d", i->name, ipcache_status_char[i->status], - i->lock ? 'L' : ' ', ttl, i->addr_count); for (k = 0; k < (int) i->addr_count; k++) { @@ -1306,15 +1301,6 @@ static int dummy_handler(u1, u2, u3) return 0; } -void ipcacheLockEntry(name) - char *name; -{ - ipcache_entry *i; - if ((i = ipcache_get(name)) == NULL) - return; - i->lock++; -} - static int ipcacheHasPending(i) ipcache_entry *i; {