--------------------- PatchSet 1184 Date: 2001/01/07 23:34:52 Author: adri Branch: modio Tag: (none) Log: After careful consideration I've discovered that yes, I *can* increment http->out.offset when I'm reading bits of the buffer in. So, whenever I read data in from storeClientCopy() in places where I am using bufofs to populate a partial buffer, bump up http->out.offset. This way, when we start reading data into "normal" buffers, we don't have to up out.offset with the value of bufofs. Members: src/client_side.c:1.2.2.12->1.2.2.13 Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.2.2.12 retrieving revision 1.2.2.13 diff -u -r1.2.2.12 -r1.2.2.13 --- squid/src/client_side.c 6 Jan 2001 14:45:16 -0000 1.2.2.12 +++ squid/src/client_side.c 7 Jan 2001 23:34:52 -0000 1.2.2.13 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.2.2.12 2001/01/06 14:45:16 adri Exp $ + * $Id: client_side.c,v 1.2.2.13 2001/01/07 23:34:52 adri Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -494,10 +494,11 @@ /* continue */ } else { http->bufofs += size; + http->out.offset += size; assert(http->bufofs <= CLIENT_SOCK_SZ); storeClientCopy(entry, - http->out.offset + http->bufofs, - http->out.offset + http->bufofs, + http->out.offset, + http->out.offset, CLIENT_SOCK_SZ - http->bufofs, buf + http->bufofs, clientHandleIMSReply, @@ -1396,10 +1397,11 @@ } else { debug(33, 3) ("clientCacheHit: waiting for HTTP reply headers\n"); http->bufofs += size; + http->out.offset += size; assert(http->bufofs <= CLIENT_SOCK_SZ); storeClientCopy(e, - http->out.offset + http->bufofs, - http->out.offset + http->bufofs, + http->out.offset, + http->out.offset, CLIENT_SOCK_SZ - http->bufofs, buf + http->bufofs, clientCacheHit, @@ -1765,10 +1767,11 @@ } else if (size < CLIENT_SOCK_SZ && entry->store_status == STORE_PENDING) { /* wait for more to arrive */ http->bufofs += size; + http->out.offset += size; assert(http->bufofs <= CLIENT_SOCK_SZ); storeClientCopy(entry, - http->out.offset + http->bufofs, - http->out.offset + http->bufofs, + http->out.offset, + http->out.offset, CLIENT_SOCK_SZ - http->bufofs, buf + http->bufofs, clientSendMoreData,