--------------------- PatchSet 1916 Date: 2005/10/01 05:09:11 Author: dwsquid Branch: squid3-icap Tag: (none) Log: rename 'leaky' to 'MsgPipeLeaker' Members: src/ICAPAnchor.cc:1.1.2.30->1.1.2.31 src/ICAPClientSideHook.cc:1.1.2.7->1.1.2.8 src/ICAPOptXact.cc:1.1.2.3->1.1.2.4 src/MsgPipe.cc:1.1.2.13->1.1.2.14 Index: squid3/src/ICAPAnchor.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPAnchor.cc,v retrieving revision 1.1.2.30 retrieving revision 1.1.2.31 diff -u -r1.1.2.30 -r1.1.2.31 --- squid3/src/ICAPAnchor.cc 30 Sep 2005 20:58:11 -0000 1.1.2.30 +++ squid3/src/ICAPAnchor.cc 1 Oct 2005 05:09:11 -0000 1.1.2.31 @@ -14,7 +14,7 @@ CBDATA_CLASS_INIT(ICAPAnchor); -extern LeakFinder *leaky; +extern LeakFinder *MsgPipeLeaker; ICAPAnchor::ICAPAnchor(ICAPServiceRep::Pointer aService): service(aService), httpState(NULL), virgin(NULL), adapted(NULL) { @@ -41,7 +41,7 @@ httpState = cbdataReference(anHttpState); virgin = new MsgPipe("virgin"); // this is the place to create a refcount ptr - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->source = this; virgin->data = new MsgPipeData; virgin->data->cause = requestLink(request); @@ -50,7 +50,7 @@ virgin->data->body->init(ICAPMsgPipeBufSizeMin, ICAPMsgPipeBufSizeMax); adapted = new MsgPipe("adapted"); - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted->sink = this; #if ICAP_ANCHOR_LOOPBACK @@ -74,7 +74,7 @@ * than will fit in body MemBuf. Caller should use * potentialSpaceSize() to find out how much we can hold. */ - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->data->body->append(buf.data, buf.length); virgin->sendSourceProgress(); } @@ -85,7 +85,7 @@ if (virgin == NULL) return 0; - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); return (int) virgin->data->body->potentialSpaceSize(); } @@ -103,7 +103,7 @@ return; #else - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->sendSourceFinish(); #endif } @@ -120,7 +120,7 @@ { debug(93,5)("ICAPAnchor::noteSinkNeed() called\n"); - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); if (virgin->data->body->potentialSpaceSize()) httpState->icapSpaceAvailable(); @@ -138,7 +138,7 @@ void ICAPAnchor::noteSourceStart(MsgPipe *p) { debug(93,5)("ICAPAnchor::noteSourceStart() called\n"); - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); HttpReply *reply = dynamic_cast(adapted->data->header); assert(reply); // check that ICAP xaction created the right object @@ -156,7 +156,7 @@ debug(93,5)("ICAPAnchor::noteSourceProgress() called\n"); //tell HttpStateData to store a fresh portion of the adapted response - leakTouch(p, leaky); + leakTouch(p, MsgPipeLeaker); if (p->data->body->hasContent()) { httpState->takeAdaptedBody(p->data->body); @@ -168,7 +168,7 @@ { debug(93,5)("ICAPAnchor::noteSourceFinish() called\n"); //tell HttpStateData that we expect no more response data - leakTouch(p, leaky); + leakTouch(p, MsgPipeLeaker); httpState->doneAdapting(); stop(notifyNone); } @@ -177,7 +177,7 @@ void ICAPAnchor::noteSourceAbort(MsgPipe *p) { debug(93,5)("ICAPAnchor::noteSourceAbort() called\n"); - leakTouch(p, leaky); + leakTouch(p, MsgPipeLeaker); stop(notifyOwner); } @@ -185,7 +185,7 @@ void ICAPAnchor::stop(Notify notify) { if (virgin != NULL) { - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); if (notify == notifyIcap) virgin->sendSourceAbort(); @@ -196,7 +196,7 @@ } if (adapted != NULL) { - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); if (notify == notifyIcap) adapted->sendSinkAbort(); @@ -222,7 +222,7 @@ requestUnlink(virgin->data->cause); virgin->data->cause = NULL; virgin->data->header = NULL; - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin = NULL; // refcounted } @@ -241,6 +241,6 @@ adapted->data->header = NULL; } - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted = NULL; // refcounted } Index: squid3/src/ICAPClientSideHook.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPClientSideHook.cc,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- squid3/src/ICAPClientSideHook.cc 29 Sep 2005 18:00:44 -0000 1.1.2.7 +++ squid3/src/ICAPClientSideHook.cc 1 Oct 2005 05:09:11 -0000 1.1.2.8 @@ -12,7 +12,7 @@ #include "LeakFinder.h" -extern LeakFinder *leaky; +extern LeakFinder *MsgPipeLeaker; CBDATA_CLASS_INIT(ICAPClientSideHook); @@ -40,7 +40,7 @@ http = cbdataReference(aHttp); virgin = new MsgPipe("virgin"); // this is the place to create a refcount ptr - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->source = this; virgin->data = new MsgPipeData; virgin->data->cause = NULL; @@ -49,7 +49,7 @@ virgin->data->body->init(ICAPMsgPipeBufSizeMin, ICAPMsgPipeBufSizeMax); adapted = new MsgPipe("adapted"); - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted->sink = this; fatal("fix following ICAPInitXaction() call"); @@ -68,7 +68,7 @@ * than will fit in body MemBuf. Caller should use * potentialSpaceSize() to find out how much we can hold. */ - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->data->body->append(buf.data, buf.length); virgin->sendSourceProgress(); } @@ -79,7 +79,7 @@ if (virgin == NULL) return 0; - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); return (int) virgin->data->body->potentialSpaceSize(); } @@ -88,7 +88,7 @@ void ICAPClientSideHook::doneSending() { debug(93,3)("ICAPClientSideHook::doneSending() called\n"); - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->sendSourceFinish(); } @@ -105,7 +105,7 @@ { debug(93,3)("ICAPClientSideHook::noteSinkNeed() called\n"); - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); if (virgin->data->body->potentialSpaceSize()) http->icapSpaceAvailable(); @@ -123,7 +123,7 @@ void ICAPClientSideHook::noteSourceStart(MsgPipe *p) { debug(93,3)("ICAPClientSideHook::noteSourceStart() called\n"); - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); http->takeAdaptedHeaders(adapted->data->header); noteSourceProgress(p); } @@ -134,7 +134,7 @@ debug(93,3)("ICAPClientSideHook::noteSourceProgress() called\n"); //tell ClientHttpRequest to store a fresh portion of the adapted response - leakTouch(p, leaky); + leakTouch(p, MsgPipeLeaker); if (p->data->body->hasContent()) { http->takeAdaptedBody(p->data->body); @@ -146,7 +146,7 @@ { debug(93,3)("ICAPClientSideHook::noteSourceFinish() called\n"); //tell ClientHttpRequest that we expect no more response data - leakTouch(p, leaky); + leakTouch(p, MsgPipeLeaker); http->doneAdapting(); stop(notifyNone); } @@ -155,7 +155,7 @@ void ICAPClientSideHook::noteSourceAbort(MsgPipe *p) { debug(93,3)("ICAPClientSideHook::noteSourceAbort() called\n"); - leakTouch(p, leaky); + leakTouch(p, MsgPipeLeaker); stop(notifyOwner); } @@ -163,7 +163,7 @@ void ICAPClientSideHook::stop(Notify notify) { if (virgin != NULL) { - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); if (notify == notifyIcap) virgin->sendSourceAbort(); @@ -174,7 +174,7 @@ } if (adapted != NULL) { - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); if (notify == notifyIcap) adapted->sendSinkAbort(); @@ -200,13 +200,13 @@ // virgin->data->cause should be NULL; requestUnlink(dynamic_cast(virgin->data->header)); virgin->data->header = NULL; - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin = NULL; // refcounted } void ICAPClientSideHook::freeAdapted() { adapted->data->header = NULL; // we don't own it - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted = NULL; // refcounted } Index: squid3/src/ICAPOptXact.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/ICAPOptXact.cc,v retrieving revision 1.1.2.3 retrieving revision 1.1.2.4 diff -u -r1.1.2.3 -r1.1.2.4 --- squid3/src/ICAPOptXact.cc 21 Sep 2005 20:34:30 -0000 1.1.2.3 +++ squid3/src/ICAPOptXact.cc 1 Oct 2005 05:09:11 -0000 1.1.2.4 @@ -15,7 +15,7 @@ #include "LeakFinder.h" -extern LeakFinder *leaky; +extern LeakFinder *MsgPipeLeaker; CBDATA_CLASS_INIT(ICAPOptXact); @@ -147,7 +147,7 @@ // service = anService; virgin = new MsgPipe("virgin"); - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->source = this; virgin->data = new MsgPipeData; @@ -157,7 +157,7 @@ memBufInit(virgin->data->body, ICAPMsgPipeBufSizeMin, ICAPMsgPipeBufSizeMax); adapted = new MsgPipe("adapted"); - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted->sink = this; init(virgin, adapted); @@ -173,7 +173,7 @@ service = new ICAPServiceRep(); virgin = new MsgPipe("virgin"); - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->source = this; virgin->data = new MsgPipeData; @@ -183,7 +183,7 @@ memBufInit(virgin->data->body, ICAPMsgPipeBufSizeMin, ICAPMsgPipeBufSizeMax); adapted = new MsgPipe("adapted"); - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted->sink = this; init(virgin, adapted); @@ -246,7 +246,7 @@ void ICAPOptXact::sendNext() { debug(93,0)("ICAPOptXact::sendNext() called\n"); - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin->sendSourceProgress(); } @@ -254,7 +254,7 @@ void ICAPOptXact::doneSending() { debugs(93, 3, "ICAPOptXact::doneSending() called\n"); - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); #if ICAP_CLIENTSIDEHOOK_LOOPBACK @@ -278,7 +278,7 @@ { debug(93,0)("ICAPOptXact::noteSinkNeed() called\n"); - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); // if (virgin->data->body->potentialSpaceSize()) // chr->icapSpaceAvailable(); @@ -295,7 +295,7 @@ void ICAPOptXact::noteSourceProgress(MsgPipe *p) { debug(93,0)("ICAPOptXact::noteSourceProgress() called\n"); - leakTouch(p, leaky); + leakTouch(p, MsgPipeLeaker); // if (p->data->body->hasContent()) { // chr->takeAdaptedBody(p->data->body); // } @@ -315,7 +315,7 @@ void ICAPOptXact::noteSourceAbort(MsgPipe *p) { debug(93,0)("ICAPOptXact::noteSourceAbort() called\n"); - leakTouch(p, leaky); + leakTouch(p, MsgPipeLeaker); stop(notifyOwner); } @@ -323,7 +323,7 @@ void ICAPOptXact::stop(Notify notify) { if (virgin != NULL) { - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); if (notify == notifyIcap) virgin->sendSourceAbort(); @@ -334,7 +334,7 @@ } if (adapted != NULL) { - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); if (notify == notifyIcap) adapted->sendSinkAbort(); @@ -405,14 +405,14 @@ requestUnlink(virgin->data->cause); virgin->data->cause = NULL; virgin->data->header = NULL; - leakTouch(virgin.getRaw(), leaky); + leakTouch(virgin.getRaw(), MsgPipeLeaker); virgin = NULL; // refcounted } void ICAPOptXact::freeAdapted() { adapted->data->header = NULL; // we don't own it - leakTouch(adapted.getRaw(), leaky); + leakTouch(adapted.getRaw(), MsgPipeLeaker); adapted = NULL; // refcounted } Index: squid3/src/MsgPipe.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Attic/MsgPipe.cc,v retrieving revision 1.1.2.13 retrieving revision 1.1.2.14 diff -u -r1.1.2.13 -r1.1.2.14 --- squid3/src/MsgPipe.cc 1 Oct 2005 03:39:15 -0000 1.1.2.13 +++ squid3/src/MsgPipe.cc 1 Oct 2005 05:09:11 -0000 1.1.2.14 @@ -5,7 +5,7 @@ #include "MsgPipeData.h" #include "LeakFinder.h" -LeakFinder *leaky = new LeakFinder; +LeakFinder *MsgPipeLeaker = new LeakFinder; CBDATA_CLASS_INIT(MsgPipe); @@ -31,7 +31,7 @@ MsgPipe::MsgPipe(const char *aName): name(aName), data(NULL), source(NULL), sink(NULL) { - leakAdd(this, leaky); + leakAdd(this, MsgPipeLeaker); } MsgPipe::~MsgPipe() @@ -39,12 +39,12 @@ delete data; delete source; delete sink; - leakFree(this, leaky); + leakFree(this, MsgPipeLeaker); }; void MsgPipe::sendSourceStart() { - leakTouch(this, leaky); + leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSourceStart() called\n"); sendLater("SourceStart", &MsgPipe_sendSourceStart, sink); } @@ -53,14 +53,14 @@ void MsgPipe::sendSourceProgress() { - leakTouch(this, leaky); + leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSourceProgress() called\n"); sendLater("SourceProgress", &MsgPipe_sendSourceProgress, sink); } void MsgPipe::sendSourceFinish() { - leakTouch(this, leaky); + leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSourceFinish() called\n"); sendLater("sendSourceFinish", &MsgPipe_sendSourceFinish, sink); source = NULL; @@ -68,7 +68,7 @@ void MsgPipe::sendSourceAbort() { - leakTouch(this, leaky); + leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSourceAbort() called\n"); sendLater("SourceAbort", &MsgPipe_sendSourceAbort, sink); source = NULL; @@ -77,14 +77,14 @@ void MsgPipe::sendSinkNeed() { - leakTouch(this, leaky); + leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSinkNeed() called\n"); sendLater("SinkNeed", &MsgPipe_sendSinkNeed, source); } void MsgPipe::sendSinkAbort() { - leakTouch(this, leaky); + leakTouch(this, MsgPipeLeaker); debug(99,5)("MsgPipe::sendSinkAbort() called\n"); sendLater("SinkAbort", &MsgPipe_sendSinkAbort, source); sink = NULL; @@ -92,7 +92,7 @@ void MsgPipe::sendLater(const char *callName, EVH * handler, MsgPipeEnd *destination) { - leakTouch(this, leaky); + leakTouch(this, MsgPipeLeaker); if (canSend(destination, callName, true)) eventAdd(callName, handler, this, 0.0, 0, true); @@ -100,7 +100,7 @@ bool MsgPipe::canSend(MsgPipeEnd *destination, const char *callName, bool future) { - leakTouch(this, leaky); + leakTouch(this, MsgPipeLeaker); const bool res = destination != NULL; const char *verb = future ? (res ? "will send " : "wont send ") :