]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Thu, 5 Oct 2000 01:34:13 +0000 (01:34 +0000)
committerwessels <>
Thu, 5 Oct 2000 01:34:13 +0000 (01:34 +0000)
 - Make ipcache/fqdncache entry lock counter a short just to be
   further reduce the chance that it overflows.

src/fqdncache.cc
src/ipcache.cc

index deae7bfb336a7e50ee75cbb5b2a570f0133bccd3..b1d36390f398270c30a56e507b139e7393d90aa1 100644 (file)
@@ -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);
index deaac6155a980fe733e081992962bc8f9334ba7d..ad2c94b4cfbc052e66454d7ca6c41beef518748a 100644 (file)
@@ -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;