From: Alex Rousskov Date: Mon, 29 Sep 2008 06:03:57 +0000 (-0600) Subject: Fixed indentation. X-Git-Tag: SQUID_3_1_0_1~45^2~11^2~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1a768b22682298b86fabff27fae9c000ea7125c;p=thirdparty%2Fsquid.git Fixed indentation. --- diff --git a/src/eCAP/MessageRep.cc b/src/eCAP/MessageRep.cc index 71caa82e5f..fc99cccafa 100644 --- a/src/eCAP/MessageRep.cc +++ b/src/eCAP/MessageRep.cc @@ -352,7 +352,7 @@ Ecap::MessageRep::MessageRep(HttpMsg *rawHeader): if (HttpReply *rep = dynamic_cast(theMessage.header)) theFirstLineRep = new StatusLineRep(*rep); else - Must(false); // unknown message header type + Must(false); // unknown message header type theHeaderRep = new HeaderRep(*theMessage.header); diff --git a/src/eCAP/MessageRep.h b/src/eCAP/MessageRep.h index 9abef7d188..ee6ec340c1 100644 --- a/src/eCAP/MessageRep.h +++ b/src/eCAP/MessageRep.h @@ -145,10 +145,10 @@ public: explicit MessageRep(HttpMsg *rawHeader); virtual ~MessageRep(); - virtual libecap::shared_ptr clone() const; + virtual libecap::shared_ptr clone() const; - virtual libecap::FirstLine &firstLine(); - virtual const libecap::FirstLine &firstLine() const; + virtual libecap::FirstLine &firstLine(); + virtual const libecap::FirstLine &firstLine() const; virtual libecap::Header &header(); virtual const libecap::Header &header() const; @@ -156,10 +156,10 @@ public: virtual void addBody(); virtual libecap::Body *body(); virtual const libecap::Body *body() const; - void tieBody(Ecap::XactionRep *x); // to a specific transaction + void tieBody(Ecap::XactionRep *x); // to a specific transaction - Adaptation::Message &raw() { return theMessage; } // for host access - const Adaptation::Message &raw() const { return theMessage; } // for host + Adaptation::Message &raw() { return theMessage; } // for host access + const Adaptation::Message &raw() const { return theMessage; } // for host private: Adaptation::Message theMessage; // the message being translated to libecap diff --git a/src/eCAP/ServiceRep.h b/src/eCAP/ServiceRep.h index ae045a1b88..69a7b92964 100644 --- a/src/eCAP/ServiceRep.h +++ b/src/eCAP/ServiceRep.h @@ -23,8 +23,8 @@ public: ServiceRep(const Adaptation::ServiceConfig &config); virtual ~ServiceRep(); - typedef libecap::shared_ptr AdapterService; - void noteService(const AdapterService &s); + typedef libecap::shared_ptr AdapterService; + void noteService(const AdapterService &s); virtual void finalize(); @@ -42,10 +42,10 @@ public: // called by transactions to report service failure virtual void noteFailure(); - virtual const char *status() const; + virtual const char *status() const; private: - AdapterService theService; // the actual adaptation service we represent + AdapterService theService; // the actual adaptation service we represent }; } // namespace Ecap diff --git a/src/eCAP/XactionRep.cc b/src/eCAP/XactionRep.cc index 12f15f43c2..773f9e1dd3 100644 --- a/src/eCAP/XactionRep.cc +++ b/src/eCAP/XactionRep.cc @@ -60,20 +60,20 @@ Ecap::XactionRep::swanSong() // this code does not maintain proxying* and canAccessVb states; should it? if (theAnswerRep != NULL) { - BodyPipe::Pointer body_pipe = answer().body_pipe; - if (body_pipe != NULL) { - Must(body_pipe->stillProducing(this)); - stopProducingFor(body_pipe, false); - } - } + BodyPipe::Pointer body_pipe = answer().body_pipe; + if (body_pipe != NULL) { + Must(body_pipe->stillProducing(this)); + stopProducingFor(body_pipe, false); + } + } { - BodyPipe::Pointer body_pipe = theVirginRep.raw().body_pipe; - if (body_pipe != NULL) { - Must(body_pipe->stillConsuming(this)); - stopConsumingFrom(body_pipe); - } - } + BodyPipe::Pointer body_pipe = theVirginRep.raw().body_pipe; + if (body_pipe != NULL) { + Must(body_pipe->stillConsuming(this)); + stopConsumingFrom(body_pipe); + } + } terminateMaster(); Adaptation::Initiate::swanSong(); @@ -102,8 +102,8 @@ Ecap::XactionRep::adapted() Adaptation::Message & Ecap::XactionRep::answer() { - MessageRep *rep = dynamic_cast(theAnswerRep.get()); - Must(rep); + MessageRep *rep = dynamic_cast(theAnswerRep.get()); + Must(rep); return rep->raw(); } @@ -114,7 +114,7 @@ Ecap::XactionRep::terminateMaster() AdapterXaction x = theMaster; theMaster.reset(); x->stop(); - } + } } bool @@ -161,9 +161,9 @@ Ecap::XactionRep::useVirgin() if (proxyingVb == opUndecided) proxyingVb = opNever; - HttpMsg *clone = theVirginRep.raw().header->clone(); + HttpMsg *clone = theVirginRep.raw().header->clone(); // check that clone() copies the pipe so that we do not have to - Must(!theVirginRep.raw().header->body_pipe == !clone->body_pipe); + Must(!theVirginRep.raw().header->body_pipe == !clone->body_pipe); sendAnswer(clone); Must(done()); } @@ -176,17 +176,17 @@ Ecap::XactionRep::useAdapted(const libecap::shared_ptr &m) theAnswerRep = m; Must(proxyingAb == opUndecided); - HttpMsg *msg = answer().header; + HttpMsg *msg = answer().header; if (!theAnswerRep->body()) { // final, bodyless answer proxyingAb = opNever; sendAnswer(msg); - } else { // got answer headers but need to handle body + } else { // got answer headers but need to handle body proxyingAb = opOn; - Must(!msg->body_pipe); // only host can set body pipes + Must(!msg->body_pipe); // only host can set body pipes MessageRep *rep = dynamic_cast(theAnswerRep.get()); - Must(rep); - rep->tieBody(this); // sets us as a producer - Must(msg->body_pipe != NULL); // check tieBody + Must(rep); + rep->tieBody(this); // sets us as a producer + Must(msg->body_pipe != NULL); // check tieBody sendAnswer(msg); @@ -249,11 +249,11 @@ Ecap::XactionRep::vbContent(libecap::size_type o, libecap::size_type s) // nsize means no size limit: all content starting from offset const size_t size = s == libecap::nsize ? - haveSize - offset : static_cast(s); + haveSize - offset : static_cast(s); // XXX: optimize by making theBody a shared_ptr (see Area::FromTemp*() src) return libecap::Area::FromTempBuffer(p->buf().content() + offset, - min(static_cast(haveSize - offset), size)); + min(static_cast(haveSize - offset), size)); } void @@ -375,7 +375,7 @@ Ecap::XactionRep::moveAbContent() const libecap::Area c = theMaster->abContent(0, libecap::nsize); debugs(93,5, HERE << " up to " << c.size << " bytes"); if (const size_t used = answer().body_pipe->putMoreData(c.start, c.size)) - theMaster->abContentShift(used); + theMaster->abContentShift(used); } const char * @@ -391,22 +391,22 @@ Ecap::XactionRep::status() const if (!canAccessVb) buf.append("x", 1); if (vp != NULL && vp->stillConsuming(this)) { - buf.append("Vb", 2); + buf.append("Vb", 2); buf.append(vp->status(), strlen(vp->status())); // XXX - } else + } else buf.append("V.", 2); - } + } if (proxyingAb == opOn) { MessageRep *rep = dynamic_cast(theAnswerRep.get()); Must(rep); - const BodyPipePointer &ap = rep->raw().body_pipe; - if (ap != NULL && ap->stillProducing(this)) { - buf.append(" Ab", 3); - buf.append(ap->status(), strlen(ap->status())); // XXX - } else - buf.append(" A.", 3); - } + const BodyPipePointer &ap = rep->raw().body_pipe; + if (ap != NULL && ap->stillProducing(this)) { + buf.append(" Ab", 3); + buf.append(ap->status(), strlen(ap->status())); // XXX + } else + buf.append(" A.", 3); + } buf.Printf(" ecapx%d]", id); diff --git a/src/eCAP/XactionRep.h b/src/eCAP/XactionRep.h index 2386d4064c..cf979fc43b 100644 --- a/src/eCAP/XactionRep.h +++ b/src/eCAP/XactionRep.h @@ -28,8 +28,8 @@ public: XactionRep(Adaptation::Initiator *anInitiator, HttpMsg *virginHeader, HttpRequest *virginCause, const Adaptation::ServicePointer &service); virtual ~XactionRep(); - typedef libecap::shared_ptr AdapterXaction; - void master(const AdapterXaction &aMaster); // establish a link + typedef libecap::shared_ptr AdapterXaction; + void master(const AdapterXaction &aMaster); // establish a link // libecap::host::Xaction API virtual libecap::Message &virgin(); @@ -48,8 +48,8 @@ public: virtual void noteAbContentDone(bool atEnd); virtual void noteAbContentAvailable(); - // libecap::Callable API, via libecap::host::Xaction - virtual bool callable() const; + // libecap::Callable API, via libecap::host::Xaction + virtual bool callable() const; // BodyProducer API virtual void noteMoreBodySpaceAvailable(RefCount bp); @@ -79,20 +79,20 @@ protected: void scheduleStop(const char *reason); private: - AdapterXaction theMaster; // the actual adaptation xaction we represent + AdapterXaction theMaster; // the actual adaptation xaction we represent - MessageRep theVirginRep; - MessageRep *theCauseRep; + MessageRep theVirginRep; + MessageRep *theCauseRep; - typedef libecap::shared_ptr MessagePtr; - MessagePtr theAnswerRep; + typedef libecap::shared_ptr MessagePtr; + MessagePtr theAnswerRep; typedef enum { opUndecided, opOn, opComplete, opNever } OperationState; - OperationState proxyingVb; // delivering virgin body from core to adapter - OperationState proxyingAb; // delivering adapted body from adapter to core - bool canAccessVb; // virgin BodyPipe content is accessible + OperationState proxyingVb; // delivering virgin body from core to adapter + OperationState proxyingAb; // delivering adapted body from adapter to core + bool canAccessVb; // virgin BodyPipe content is accessible - CBDATA_CLASS2(XactionRep); + CBDATA_CLASS2(XactionRep); }; } // namespace Ecap