From: wessels <> Date: Thu, 5 Oct 2000 01:34:13 +0000 (+0000) Subject: DW: X-Git-Tag: SQUID_3_0_PRE1~1832 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ac06f7202ef126ceb018dc9634d5c61772b429c9;p=thirdparty%2Fsquid.git DW: - Make ipcache/fqdncache entry lock counter a short just to be further reduce the chance that it overflows. --- diff --git a/src/fqdncache.cc b/src/fqdncache.cc index deae7bfb33..b1d36390f3 100644 --- a/src/fqdncache.cc +++ b/src/fqdncache.cc @@ -1,6 +1,6 @@ /* - * $Id: fqdncache.cc,v 1.139 2000/10/04 01:02:13 wessels Exp $ + * $Id: fqdncache.cc,v 1.140 2000/10/04 19:34:13 wessels Exp $ * * DEBUG: section 35 FQDN Cache * AUTHOR: Harvest Derived @@ -53,7 +53,7 @@ struct _fqdncache_entry { char *error_message; struct timeval request_time; dlink_node lru; - unsigned char locks; + unsigned short locks; struct { unsigned int negcached:1; } flags; @@ -500,10 +500,7 @@ fqdncacheLockEntry(fqdncache_entry * f) static void fqdncacheUnlockEntry(fqdncache_entry * f) { - if (f->locks == 0) { - debug_trap("fqdncacheUnlockEntry: Entry has no locks"); - return; - } + assert(f->locks > 0); f->locks--; if (fqdncacheExpiredEntry(f)) fqdncacheRelease(f); diff --git a/src/ipcache.cc b/src/ipcache.cc index deaac6155a..ad2c94b4cf 100644 --- a/src/ipcache.cc +++ b/src/ipcache.cc @@ -1,6 +1,6 @@ /* - * $Id: ipcache.cc,v 1.223 2000/10/04 01:02:13 wessels Exp $ + * $Id: ipcache.cc,v 1.224 2000/10/04 19:34:14 wessels Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -49,7 +49,7 @@ struct _ipcache_entry { char *error_message; struct timeval request_time; dlink_node lru; - unsigned char locks; + unsigned short locks; struct { unsigned int negcached:1; } flags;