]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Accept some unknown store meta entries without throwing away the rest.
authorhno <>
Sat, 15 Dec 2007 02:47:54 +0000 (02:47 +0000)
committerhno <>
Sat, 15 Dec 2007 02:47:54 +0000 (02:47 +0000)
The store meta parser stopped when encountering the first "unknown" entry.
This is bad for extensibility. Should continue parsing what we do know
how to handle.

src/StoreMetaUnpacker.cc

index 91e267c5649c7d4e6cb35daf89b3caaa82e439ae..f38dfb7b48a50e1d506710959a60d0d276089892 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMetaUnpacker.cc,v 1.5 2007/04/30 16:56:09 wessels Exp $
+ * $Id: StoreMetaUnpacker.cc,v 1.6 2007/12/14 19:47:54 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Unpacker
  * AUTHOR: Robert Collins
@@ -98,10 +98,8 @@ StoreMetaUnpacker::doOneEntry()
 
     StoreMeta *newNode = StoreMeta::Factory(type, length, &buf[position]);
 
-    if (!newNode)
-        return false;
-
-    tail = StoreMeta::Add (tail, newNode);
+    if (newNode)
+       tail = StoreMeta::Add (tail, newNode);
 
     position += length;