--------------------- PatchSet 1860 Date: 2005/09/21 20:36:07 Author: dwsquid Branch: squid3-icap Tag: (none) Log: We are now hooked into ClientHttpRequest instead of ClientRequestContext Members: src/ICAPClientSideHook.cc:1.1.2.5->1.1.2.6 src/ICAPClientSideHook.h:1.1.2.2->1.1.2.3 Index: squid3/src/ICAPClientSideHook.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPClientSideHook.cc,v retrieving revision 1.1.2.5 retrieving revision 1.1.2.6 diff -u -r1.1.2.5 -r1.1.2.6 --- squid3/src/ICAPClientSideHook.cc 19 Sep 2005 20:48:33 -0000 1.1.2.5 +++ squid3/src/ICAPClientSideHook.cc 21 Sep 2005 20:36:07 -0000 1.1.2.6 @@ -15,7 +15,7 @@ CBDATA_CLASS_INIT(ICAPClientSideHook); -ICAPClientSideHook::ICAPClientSideHook(): client_context(NULL), virgin(NULL), adapted(NULL) +ICAPClientSideHook::ICAPClientSideHook(): http(NULL), virgin(NULL), adapted(NULL) { debug(93,3)("ICAPClientSideHook constructed, this=%p\n", this); } @@ -23,7 +23,7 @@ ICAPClientSideHook::~ICAPClientSideHook() { stop(notifyNone); - cbdataReferenceDone(client_context); + cbdataReferenceDone(http); debug(93,3)("ICAPClientSideHook destructed, this=%p\n", this); if (virgin != NULL) @@ -33,10 +33,10 @@ freeAdapted(); } -void ICAPClientSideHook::startReqMod(ClientRequestContext *aContext, HttpRequest *request) +void ICAPClientSideHook::startReqMod(ClientHttpRequest *aHttp, HttpRequest *request) { debug(93,3)("ICAPClientSideHook::startReqMod() called\n"); - client_context = cbdataReference(aContext); + http = cbdataReference(aHttp); virgin = new MsgPipe("virgin"); // this is the place to create a refcount ptr leakTouch(virgin.getRaw(), leaky); @@ -106,7 +106,7 @@ leakTouch(virgin.getRaw(), leaky); if (virgin->data->body->potentialSpaceSize()) - client_context->icapSpaceAvailable(); + http->icapSpaceAvailable(); } // ICAP client aborting @@ -122,7 +122,7 @@ { debug(93,3)("ICAPClientSideHook::noteSourceStart() called\n"); leakTouch(adapted.getRaw(), leaky); - client_context->takeAdaptedHeaders(adapted->data->header); + http->takeAdaptedHeaders(adapted->data->header); noteSourceProgress(p); } @@ -135,7 +135,7 @@ leakTouch(p, leaky); if (p->data->body->hasContent()) { - client_context->takeAdaptedBody(p->data->body); + http->takeAdaptedBody(p->data->body); } } @@ -145,7 +145,7 @@ debug(93,3)("ICAPClientSideHook::noteSourceFinish() called\n"); //tell ClientHttpRequest that we expect no more response data leakTouch(p, leaky); - client_context->doneAdapting(); + http->doneAdapting(); stop(notifyNone); } @@ -182,14 +182,14 @@ freeAdapted(); } - if (client_context) { + if (http) { if (notify == notifyOwner) // tell ClientHttpRequest that we are aborting prematurely - client_context->abortAdapting(); + http->abortAdapting(); - cbdataReferenceDone(client_context); + cbdataReferenceDone(http); - // client_context is now NULL, will not call it any more + // http is now NULL, will not call it any more } } Index: squid3/src/ICAPClientSideHook.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPClientSideHook.h,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- squid3/src/ICAPClientSideHook.h 19 Sep 2005 18:00:09 -0000 1.1.2.2 +++ squid3/src/ICAPClientSideHook.h 21 Sep 2005 20:36:07 -0000 1.1.2.3 @@ -1,6 +1,6 @@ /* - * $Id: ICAPClientSideHook.h,v 1.1.2.2 2005/09/19 18:00:09 dwsquid Exp $ + * $Id: ICAPClientSideHook.h,v 1.1.2.3 2005/09/21 20:36:07 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -58,7 +58,7 @@ virtual ~ICAPClientSideHook(); // synchronous calls called by ClientHttpRequest - void startReqMod(ClientRequestContext *, HttpRequest *); + void startReqMod(ClientHttpRequest *, HttpRequest *); void sendMoreData(StoreIOBuffer buf); void doneSending(); void ownerAbort(); @@ -75,7 +75,7 @@ virtual void noteSourceAbort(MsgPipe *p); public: - ClientRequestContext *client_context; + ClientHttpRequest *http; MsgPipe::Pointer virgin; MsgPipe::Pointer adapted;