]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Correct mem positioning of swapped in data
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Mon, 27 Jul 2009 21:48:18 +0000 (23:48 +0200)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Mon, 27 Jul 2009 21:48:18 +0000 (23:48 +0200)
src/store_client.cc

index e951bab6f1030ca855707d0fa0a225d41b109e09..b98c8ff21c45f61aa85c58caf07f401efb8a7b6c 100644 (file)
@@ -510,7 +510,7 @@ store_client::readBody(const char *buf, ssize_t len)
              * cache expects offset without headers (using negative for headers)
              * eventually not storing packed headers in memory at all.
              */
-            int64_t mem_offset = entry->mem_obj->endOffset() + rep->hdr_sz;
+            int64_t mem_offset = entry->mem_obj->endOffset();
             if ((copyInto.offset == mem_offset) || (parsed_header && mem_offset == rep->hdr_sz)) {
                 entry->mem_obj->write(StoreIOBuffer(len, copyInto.offset - rep->hdr_sz, copyInto.data), storeClientMemWriteComplete, this);
             }