--------------------- PatchSet 4700 Date: 2002/08/15 22:28:18 Author: hno Branch: etag Tag: (none) Log: Bugfixes in Vary index processing Members: src/store.c:1.12.14.22->1.12.14.23 Index: squid/src/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.12.14.22 retrieving revision 1.12.14.23 diff -u -r1.12.14.22 -r1.12.14.23 --- squid/src/store.c 15 Aug 2002 18:30:44 -0000 1.12.14.22 +++ squid/src/store.c 15 Aug 2002 22:28:18 -0000 1.12.14.23 @@ -1,6 +1,6 @@ /* - * $Id: store.c,v 1.12.14.22 2002/08/15 18:30:44 hno Exp $ + * $Id: store.c,v 1.12.14.23 2002/08/15 22:28:18 hno Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -560,7 +560,7 @@ assert(l>0); assert(p < (buf+size)); } - if (p == state->buf) { + if (p == state->buf && size == state->buf_size) { /* Oops.. the buffer size is not sufficient. Grow */ if (state->buf_size < 65536) { debug(11, 2) ("storeAddVaryReadOld: Increasing entry buffer size to %d\n", state->buf_size * 2); @@ -729,7 +729,7 @@ storeLocateVaryCallback(state); return; } - state->seen_offset += size; + state->seen_offset = state->offset + size; while ((e = memchr(p, '\n', l)) != NULL) { int l2; char *p2; @@ -777,7 +777,7 @@ assert(p < (buf+size)); } state->offset += p - buf; - if (p == state->buf) { + if (p == state->buf && size == state->buf_size) { /* Oops.. the buffer size is not sufficient. Grow */ if (state->buf_size < 65536) { debug(11, 2) ("storeLocateVaryRead: Increasing entry buffer size to %d\n", state->buf_size * 2);