--------------------- PatchSet 4998 Date: 2002/09/16 22:29:57 Author: rbcollins Branch: fixrange Tag: (none) Log: user StoreIOBuffers' data member Members: src/clientStream.c:1.2.8.1->1.2.8.2 src/clientStream.h:1.1.2.1->1.1.2.2 src/client_side_reply.c:1.4.6.5->1.4.6.6 src/client_side_request.c:1.3.6.1->1.3.6.2 Index: squid/src/clientStream.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/clientStream.c,v retrieving revision 1.2.8.1 retrieving revision 1.2.8.2 diff -u -r1.2.8.1 -r1.2.8.2 --- squid/src/clientStream.c 16 Sep 2002 21:47:53 -0000 1.2.8.1 +++ squid/src/clientStream.c 16 Sep 2002 22:29:57 -0000 1.2.8.2 @@ -1,6 +1,6 @@ /* - * $Id: clientStream.c,v 1.2.8.1 2002/09/16 21:47:53 rbcollins Exp $ + * $Id: clientStream.c,v 1.2.8.2 2002/09/16 22:29:57 rbcollins Exp $ * * DEBUG: section 87 Client-side Stream routines. * AUTHOR: Robert Collins @@ -136,7 +136,7 @@ temp->head = list; clientStreamInsertHead(list, NULL, callback, cdetach, NULL, callbackdata); temp = list->tail->data; - temp->readbuf = tailbuf; + temp->readBuffer.data = tailbuf; temp->readlen = taillen; } @@ -199,7 +199,7 @@ prev->readfunc, prev->data, this); this->readoff = readoff; this->readlen = readlen; - this->readbuf = readbuf; + 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.1 retrieving revision 1.1.2.2 diff -u -r1.1.2.1 -r1.1.2.2 --- squid/src/clientStream.h 16 Sep 2002 21:48:50 -0000 1.1.2.1 +++ squid/src/clientStream.h 16 Sep 2002 22:29:57 -0000 1.1.2.2 @@ -1,6 +1,6 @@ /* - * $Id: clientStream.h,v 1.1.2.1 2002/09/16 21:48:50 rbcollins Exp $ + * $Id: clientStream.h,v 1.1.2.2 2002/09/16 22:29:57 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -45,7 +45,7 @@ CSS *status; void *data; /* Context for the node */ StoreIOBuffer readBuffer; /* what this node wants */ - char *readbuf; /* where *this* node wants its data returned; */ size_t readlen; /* how much data *this* node can handle */ + size_t readlen; /* how much data *this* node can handle */ off_t readoff; /* where *this* node wants it's data read from in the stream */ }; 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.5 retrieving revision 1.4.6.6 diff -u -r1.4.6.5 -r1.4.6.6 --- squid/src/client_side_reply.c 16 Sep 2002 21:47:53 -0000 1.4.6.5 +++ squid/src/client_side_reply.c 16 Sep 2002 22:29:57 -0000 1.4.6.6 @@ -1,6 +1,6 @@ /* - * $Id: client_side_reply.c,v 1.4.6.5 2002/09/16 21:47:53 rbcollins Exp $ + * $Id: client_side_reply.c,v 1.4.6.6 2002/09/16 22:29:57 rbcollins Exp $ * * DEBUG: section 88 Client-side Reply Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -406,7 +406,7 @@ /* here the data to send is in the next nodes buffers already */ assert(!EBIT_TEST(entry->flags, ENTRY_ABORTED)); tempresult.length = context->reqsize; - tempresult.data = next->readbuf; + tempresult.data = next->readBuffer.data; clientSendMoreData(context, tempresult); } else { /* the client can handle this reply, whatever it is */ @@ -485,7 +485,7 @@ storeClientCopy(context->sc, e, http->out.offset + context->reqofs, HTTP_REQBUF_SZ, - next->readbuf + context->reqofs, clientCacheHit, context); + next->readBuffer.data + context->reqofs, clientCacheHit, context); } return; } @@ -618,7 +618,7 @@ /* get the next chain members buffer */ next = http->client_stream.head->next->data; storeClientCopy(context->sc, e, next->readoff, next->readlen, - next->readbuf, clientSendMoreData, context); + next->readBuffer.data, clientSendMoreData, context); } } else { /* @@ -680,7 +680,7 @@ /* and trigger a read of the resulting object */ next = http->client_stream.head->next->data; storeClientCopy(context->sc, http->entry, next->readoff, next->readlen, - next->readbuf, clientSendMoreData, context); + next->readBuffer.data, clientSendMoreData, context); return; } else { clientStreamNode *next; @@ -689,7 +689,7 @@ /* And trigger a read of the resultant object */ next = http->client_stream.head->next->data; storeClientCopy(context->sc, http->entry, next->readoff, next->readlen, - next->readbuf, clientSendMoreData, context); + next->readBuffer.data, clientSendMoreData, context); if (http->redirect.status) { HttpReply *rep = httpReplyCreate(); #if LOG_TCP_REDIRECTS @@ -734,7 +734,7 @@ /* And trigger a read of the resultant object */ next = http->client_stream.head->next->data; storeClientCopy(context->sc, http->entry, next->readoff, next->readlen, - next->readbuf, clientSendMoreData, context); + next->readBuffer.data, clientSendMoreData, context); errorAppendEntry(http->entry, err); } @@ -761,7 +761,7 @@ null_request_flags); /* And trigger a read of the resultant object */ storeClientCopy(context->sc, http->entry, next->readoff, next->readlen, - next->readbuf, clientSendMoreData, context); + next->readBuffer.data, clientSendMoreData, context); errorAppendEntry(http->entry, err); return; } @@ -788,7 +788,7 @@ context->reqofs = 0; storeClientCopy(context->sc, http->entry, http->out.offset, - next->readlen, next->readbuf, clientCacheHit, context); + next->readlen, next->readBuffer.data, clientCacheHit, context); return; } } @@ -833,7 +833,7 @@ null_request_flags); /* And trigger a read of the resultant object */ storeClientCopy(context->sc, http->entry, next->readoff, next->readlen, - next->readbuf, clientSendMoreData, context); + next->readBuffer.data, clientSendMoreData, context); httpReplyReset(r = http->entry->mem_obj->reply); httpBuildVersion(&version, 1, 0); httpReplySetHeaders(r, version, status, NULL, NULL, 0, 0, -1); @@ -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->readlen, next->readbuf, + next->readoff + context->headers_sz, next->readlen, 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->readlen, next->readbuf, + next->readoff + context->headers_sz, next->readlen, next->readBuffer.data, clientSendMoreData, context); return; } @@ -1339,7 +1339,7 @@ assert(http->out.offset == http->out.size && http->out.offset == 0); storeClientCopy(context->sc, http->entry, context->reqofs, - next->readlen, next->readbuf, clientCacheHit, context); + next->readlen, next->readBuffer.data, clientCacheHit, context); } else { /* MISS CASE, http->logType is already set! */ clientProcessMiss(context); @@ -1372,7 +1372,7 @@ ConnStateData *conn = http->conn; int fd = conn ? conn->fd : -1; HttpReply *rep = NULL; - char *buf = next->readbuf; + char *buf = next->readBuffer.data; const char *body_buf = buf; ssize_t size = context->reqofs + result.length; ssize_t body_size = size; @@ -1454,7 +1454,7 @@ /* And trigger a read of the resultant object */ next = http->client_stream.head->next->data; storeClientCopy(context->sc, http->entry, next->readoff, - next->readlen, next->readbuf, clientSendMoreData, context); + next->readlen, next->readBuffer.data, clientSendMoreData, context); errorAppendEntry(http->entry, err); httpReplyDestroy(rep); return; @@ -1493,7 +1493,7 @@ /* And trigger a read of the resultant object */ next = http->client_stream.head->next->data; storeClientCopy(context->sc, http->entry, next->readoff, - next->readlen, next->readbuf, clientSendMoreData, context); + next->readlen, next->readBuffer.data, clientSendMoreData, context); errorAppendEntry(http->entry, err); httpReplyDestroy(rep); return; @@ -1506,7 +1506,7 @@ storeClientCopy(context->sc, entry, context->reqofs, next->readlen - context->reqofs, - next->readbuf + context->reqofs, clientSendMoreData, context); + next->readBuffer.data + context->reqofs, clientSendMoreData, context); return; } if (!context->flags.headersSent) 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.1 retrieving revision 1.3.6.2 diff -u -r1.3.6.1 -r1.3.6.2 --- squid/src/client_side_request.c 16 Sep 2002 21:47:53 -0000 1.3.6.1 +++ squid/src/client_side_request.c 16 Sep 2002 22:29:57 -0000 1.3.6.2 @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.c,v 1.3.6.1 2002/09/16 21:47:53 rbcollins Exp $ + * $Id: client_side_request.c,v 1.3.6.2 2002/09/16 22:29:57 rbcollins Exp $ * * DEBUG: section 85 Client-side Request Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -288,7 +288,7 @@ auth_user_request : http->request->auth_user_request); node = http->client_stream.tail->data; clientStreamRead(node, http, node->readoff, node->readlen, - node->readbuf); + 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->readlen, node->readbuf); + clientStreamRead(node, http, node->readoff, node->readlen, node->readBuffer.data); }