]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #1009: Squid is falling periodically with segmentation failed when
authorhno <>
Sat, 25 Sep 2004 04:22:49 +0000 (04:22 +0000)
committerhno <>
Sat, 25 Sep 2004 04:22:49 +0000 (04:22 +0000)
using heap policies

src/repl/heap/store_repl_heap.cc

index 8af580b0f7c0c5306dcca3902c62deb9b4c680d3..e486e492cf7fe8ee01dbee8b39c4c96f587348dc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_repl_heap.cc,v 1.14 2003/09/06 12:47:36 robertc Exp $
+ * $Id: store_repl_heap.cc,v 1.15 2004/09/24 22:22:49 hno Exp $
  *
  * DEBUG: section ?     HEAP based removal policies
  * AUTHOR: Henrik Nordstrom
@@ -232,6 +232,7 @@ try_again:
     entry = (StoreEntry *)heap_extractmin(heap->theHeap);
 
     if (storeEntryLocked(entry)) {
+        storeLockObject(entry);
         linklistPush(&heap_walker->locked_entries, entry);
         goto try_again;
     }
@@ -264,6 +265,7 @@ heap_purgeDone(RemovalPurgeWalker * walker)
     while ((entry = (StoreEntry *)linklistShift(&heap_walker->locked_entries))) {
         heap_node *node = heap_insert(heap->theHeap, entry);
         heap->setPolicyNode(entry, node);
+        storeUnlockObject(entry);
     }
 
     safe_free(walker->_data);