]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Minor cleanup of the meta TLV format to not add the incorrect STORE_META_END
authorhno <>
Sat, 20 May 2006 19:15:14 +0000 (19:15 +0000)
committerhno <>
Sat, 20 May 2006 19:15:14 +0000 (19:15 +0000)
at the end of the list (list ends by it's size). STORE_META_END has changed
a number of times over the history, and we have never cared about it but some
external tools (i.e. purge) apparently beleives what they read in the docs..

doc/Programming-Guide/prog-guide.sgml
src/StoreMetaUnpacker.cc
src/store_swapmeta.cc

index 0bdc84c6b3f8deafeb0483617bc0a21dd6ec02dc..636a63c8a8aba252a5039825e8d6b6bd9a181ffd 100644 (file)
@@ -2,7 +2,7 @@
 <article>
 <title>Squid Programmers Guide</title>
 <author>Squid Developers</author>
-<date>$Id: prog-guide.sgml,v 1.59 2006/04/22 05:28:26 robertc Exp $</date>
+<date>$Id: prog-guide.sgml,v 1.60 2006/05/20 13:15:14 hno Exp $</date>
 
 <abstract>
 Squid is a WWW Cache application developed by the National Laboratory
@@ -3605,14 +3605,22 @@ As of Squid-2.3, the following TYPES are defined (from <em/enums.h/):
        u_short flags;
 </verb>
 
+<tag/STORE_META_STD_LFS/
+       Updated version of STORE_META_STD, with support for
+       >2GB objects. As STORE_META_STD except that the swap_file_sz
+       is a squid_file_sz (64-bit integer) instead of size_t.
+
 <tag/STORE_META_HITMETERING/
        Reserved for future hit-metering (RFC 2227) stuff.
 
 <tag/STORE_META_VALID/
        ?
 
-<tag/STORE_META_END/
-       Marks the last valid META type.
+<tag/STORE_META_VARY_HEADERS/
+       Information about the Vary header relation on this object
+
+<tag/STORE_META_OBJSIZE/
+       object size, if its known
 
 </descrip>
 
index e1d648d5613449356c4c3c742fedcffc249c37ac..9456a6815383e26040eac237dac8dcfddbb45458 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StoreMetaUnpacker.cc,v 1.2 2003/02/21 22:50:06 robertc Exp $
+ * $Id: StoreMetaUnpacker.cc,v 1.3 2006/05/20 13:15:14 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Unpacker
  * AUTHOR: Robert Collins
@@ -51,7 +51,7 @@ StoreMetaUnpacker::isBufferSane()
      */
     getBufferLength();
 
-    if (*hdr_len <= MinimumBufferLength)
+    if (*hdr_len < MinimumBufferLength)
         return false;
 
     if (*hdr_len > buflen)
@@ -112,7 +112,7 @@ StoreMetaUnpacker::doOneEntry()
 bool
 StoreMetaUnpacker::moreToProcess() const
 {
-    return *hdr_len - position - MinimumBufferLength > 0;
+    return *hdr_len - position - MinimumBufferLength >= 0;
 }
 
 StoreMeta *
index fbacf6f9d9dd6cb0fe4b1517424a583c95c4deb0..2e9249ac97bbbccffdf071fa6899b85a4212ab04 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapmeta.cc,v 1.22 2003/08/04 22:14:42 robertc Exp $
+ * $Id: store_swapmeta.cc,v 1.23 2006/05/20 13:15:14 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Metadata
  * AUTHOR: Kostas Anagnostakis
@@ -119,8 +119,6 @@ storeSwapMetaPack(tlv * tlv_list, int *length)
     for (t = tlv_list; t; t = t->next)
         buflen += sizeof(char) + sizeof(int) + t->length;
 
-    buflen++;                  /* STORE_META_END */
-
     buf = (char *)xmalloc(buflen);
 
     buf[j++] = (char) STORE_META_OK;
@@ -137,7 +135,6 @@ storeSwapMetaPack(tlv * tlv_list, int *length)
         j += t->length;
     }
 
-    buf[j++] = (char) STORE_META_END;
     assert((int) j == buflen);
     *length = buflen;
     return buf;