--------------------- PatchSet 5002 Date: 2002/09/16 23:02:52 Author: rbcollins Branch: fixrange Tag: (none) Log: use the buffer offset instead of a separate offset in ClientStream Members: src/clientStream.c:1.2.8.3->1.2.8.4 src/clientStream.h:1.1.2.3->1.1.2.4 src/client_side_reply.c:1.4.6.9->1.4.6.10 src/client_side_request.c:1.3.6.3->1.3.6.4 Index: squid/src/clientStream.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/clientStream.c,v retrieving revision 1.2.8.3 retrieving revision 1.2.8.4 diff -u -r1.2.8.3 -r1.2.8.4 --- squid/src/clientStream.c 16 Sep 2002 22:52:01 -0000 1.2.8.3 +++ squid/src/clientStream.c 16 Sep 2002 23:02:52 -0000 1.2.8.4 @@ -1,6 +1,6 @@ /* - * $Id: clientStream.c,v 1.2.8.3 2002/09/16 22:52:01 rbcollins Exp $ + * $Id: clientStream.c,v 1.2.8.4 2002/09/16 23:02:52 rbcollins Exp $ * * DEBUG: section 87 Client-side Stream routines. * AUTHOR: Robert Collins @@ -197,7 +197,7 @@ debug(87, 3) ("clientStreamRead: Calling %p with cbdata %p from node %p\n", prev->readfunc, prev->data, this); - this->readoff = readoff; + this->readBuffer.offset = readoff; this->readBuffer.length = readlen; this->readBuffer.data = readbuf; prev->readfunc(prev, http); Index: squid/src/clientStream.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/clientStream.h,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid/src/clientStream.h 16 Sep 2002 22:52:01 -0000 1.1.2.3 +++ squid/src/clientStream.h 16 Sep 2002 23:02:52 -0000 1.1.2.4 @@ -1,6 +1,6 @@ /* - * $Id: clientStream.h,v 1.1.2.3 2002/09/16 22:52:01 rbcollins Exp $ + * $Id: clientStream.h,v 1.1.2.4 2002/09/16 23:02:52 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -44,8 +44,7 @@ CSD *detach; /* tell this node the next one downstream wants no more data */ CSS *status; void *data; /* Context for the node */ - StoreIOBuffer readBuffer; /* what this node wants */ - off_t readoff; /* where *this* node wants it's data read from in the stream */ + StoreIOBuffer readBuffer; /* what, where and how much this node wants */ }; #endif /* SQUID_CLIENTSTREAM_H */ Index: squid/src/client_side_reply.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/client_side_reply.c,v retrieving revision 1.4.6.9 retrieving revision 1.4.6.10 diff -u -r1.4.6.9 -r1.4.6.10 --- squid/src/client_side_reply.c 16 Sep 2002 22:58:17 -0000 1.4.6.9 +++ squid/src/client_side_reply.c 16 Sep 2002 23:02:53 -0000 1.4.6.10 @@ -1,6 +1,6 @@ /* - * $Id: client_side_reply.c,v 1.4.6.9 2002/09/16 22:58:17 rbcollins Exp $ + * $Id: client_side_reply.c,v 1.4.6.10 2002/09/16 23:02:53 rbcollins Exp $ * * DEBUG: section 88 Client-side Reply Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -617,7 +617,7 @@ /* get the next chain members buffer */ next = http->client_stream.head->next->data; - storeClientCopy(context->sc, e, next->readoff, next->readBuffer.length, + storeClientCopy(context->sc, e, next->readBuffer.offset, next->readBuffer.length, next->readBuffer.data, clientSendMoreData, context); } } else { @@ -679,7 +679,7 @@ errorAppendEntry(http->entry, err); /* and trigger a read of the resulting object */ next = http->client_stream.head->next->data; - storeClientCopy(context->sc, http->entry, next->readoff, next->readBuffer.length, + storeClientCopy(context->sc, http->entry, next->readBuffer.offset, next->readBuffer.length, next->readBuffer.data, clientSendMoreData, context); return; } else { @@ -688,7 +688,7 @@ http->entry = clientCreateStoreEntry(context, r->method, r->flags); /* And trigger a read of the resultant object */ next = http->client_stream.head->next->data; - storeClientCopy(context->sc, http->entry, next->readoff, next->readBuffer.length, + storeClientCopy(context->sc, http->entry, next->readBuffer.offset, next->readBuffer.length, next->readBuffer.data, clientSendMoreData, context); if (http->redirect.status) { HttpReply *rep = httpReplyCreate(); @@ -733,7 +733,7 @@ clientCreateStoreEntry(context, r->method, null_request_flags); /* And trigger a read of the resultant object */ next = http->client_stream.head->next->data; - storeClientCopy(context->sc, http->entry, next->readoff, next->readBuffer.length, + storeClientCopy(context->sc, http->entry, next->readBuffer.offset, next->readBuffer.length, next->readBuffer.data, clientSendMoreData, context); errorAppendEntry(http->entry, err); } @@ -760,7 +760,7 @@ clientCreateStoreEntry(context, http->request->method, null_request_flags); /* And trigger a read of the resultant object */ - storeClientCopy(context->sc, http->entry, next->readoff, next->readBuffer.length, + storeClientCopy(context->sc, http->entry, next->readBuffer.offset, next->readBuffer.length, next->readBuffer.data, clientSendMoreData, context); errorAppendEntry(http->entry, err); return; @@ -832,7 +832,7 @@ clientCreateStoreEntry(context, http->request->method, null_request_flags); /* And trigger a read of the resultant object */ - storeClientCopy(context->sc, http->entry, next->readoff, next->readBuffer.length, + storeClientCopy(context->sc, http->entry, next->readBuffer.offset, next->readBuffer.length, next->readBuffer.data, clientSendMoreData, context); httpReplyReset(r = http->entry->mem_obj->reply); httpBuildVersion(&version, 1, 0); @@ -852,7 +852,7 @@ clientCreateStoreEntry(context, context->http->request->method, null_request_flags); storeClientCopy(context->sc, context->http->entry, - next->readoff + context->headers_sz, next->readBuffer.length, next->readBuffer.data, + next->readBuffer.offset + context->headers_sz, next->readBuffer.length, next->readBuffer.data, clientSendMoreData, context); storeReleaseRequest(context->http->entry); storeBuffer(context->http->entry); @@ -1296,7 +1296,7 @@ context->ourNode = this; /* no cbdatareference, this is only used once, and safely */ if (context->flags.storelogiccomplete) { storeClientCopy(context->sc, http->entry, - next->readoff + context->headers_sz, next->readBuffer.length, next->readBuffer.data, + next->readBuffer.offset + context->headers_sz, next->readBuffer.length, next->readBuffer.data, clientSendMoreData, context); return; } @@ -1453,7 +1453,7 @@ null_request_flags); /* And trigger a read of the resultant object */ next = http->client_stream.head->next->data; - storeClientCopy(context->sc, http->entry, next->readoff, + storeClientCopy(context->sc, http->entry, next->readBuffer.offset, next->readBuffer.length, next->readBuffer.data, clientSendMoreData, context); errorAppendEntry(http->entry, err); httpReplyDestroy(rep); @@ -1492,7 +1492,7 @@ null_request_flags); /* And trigger a read of the resultant object */ next = http->client_stream.head->next->data; - storeClientCopy(context->sc, http->entry, next->readoff, + storeClientCopy(context->sc, http->entry, next->readBuffer.offset, next->readBuffer.length, next->readBuffer.data, clientSendMoreData, context); errorAppendEntry(http->entry, err); httpReplyDestroy(rep); Index: squid/src/client_side_request.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/client_side_request.c,v retrieving revision 1.3.6.3 retrieving revision 1.3.6.4 diff -u -r1.3.6.3 -r1.3.6.4 --- squid/src/client_side_request.c 16 Sep 2002 22:52:02 -0000 1.3.6.3 +++ squid/src/client_side_request.c 16 Sep 2002 23:02:54 -0000 1.3.6.4 @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.c,v 1.3.6.3 2002/09/16 22:52:02 rbcollins Exp $ + * $Id: client_side_request.c,v 1.3.6.4 2002/09/16 23:02:54 rbcollins Exp $ * * DEBUG: section 85 Client-side Request Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -287,7 +287,7 @@ && http->conn->auth_user_request ? http->conn-> auth_user_request : http->request->auth_user_request); node = http->client_stream.tail->data; - clientStreamRead(node, http, node->readoff, node->readBuffer.length, + clientStreamRead(node, http, node->readBuffer.offset, node->readBuffer.length, node->readBuffer.data); } } @@ -593,5 +593,5 @@ assert(http->out.offset == 0); /* Use the Stream Luke */ node = http->client_stream.tail->data; - clientStreamRead(node, http, node->readoff, node->readBuffer.length, node->readBuffer.data); + clientStreamRead(node, http, node->readBuffer.offset, node->readBuffer.length, node->readBuffer.data); }