]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fixed indentation.
authorAlex Rousskov <rousskov@measurement-factory.com>
Mon, 29 Sep 2008 06:03:57 +0000 (00:03 -0600)
committerAlex Rousskov <rousskov@measurement-factory.com>
Mon, 29 Sep 2008 06:03:57 +0000 (00:03 -0600)
src/eCAP/MessageRep.cc
src/eCAP/MessageRep.h
src/eCAP/ServiceRep.h
src/eCAP/XactionRep.cc
src/eCAP/XactionRep.h

index 71caa82e5f2740c5e44f597c2e4d35b904ec127c..fc99cccafa915a12dc0ba08646433df682b26bf4 100644 (file)
@@ -352,7 +352,7 @@ Ecap::MessageRep::MessageRep(HttpMsg *rawHeader):
     if (HttpReply *rep = dynamic_cast<HttpReply*>(theMessage.header))
         theFirstLineRep = new StatusLineRep(*rep);
     else
-           Must(false); // unknown message header type
+        Must(false); // unknown message header type
 
     theHeaderRep = new HeaderRep(*theMessage.header);
 
index 9abef7d188f28188f64411dc9bad892ddffd2f9c..ee6ec340c1bba7d7f7e2ac3ac5e9023d6657cabb 100644 (file)
@@ -145,10 +145,10 @@ public:
     explicit MessageRep(HttpMsg *rawHeader);
     virtual ~MessageRep();
 
-       virtual libecap::shared_ptr<libecap::Message> clone() const;
+    virtual libecap::shared_ptr<libecap::Message> 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
index ae045a1b882f93fde1c33c9df43810cebc8bafed..69a7b929644f14f071a27533756eed0aa59a2219 100644 (file)
@@ -23,8 +23,8 @@ public:
     ServiceRep(const Adaptation::ServiceConfig &config);
     virtual ~ServiceRep();
 
-       typedef libecap::shared_ptr<libecap::adapter::Service> AdapterService;
-       void noteService(const AdapterService &s);
+    typedef libecap::shared_ptr<libecap::adapter::Service> 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
index 12f15f43c2be9522b62c805672cae7e824c0d367..773f9e1dd312979024c112128a0eab752f3b9a78 100644 (file)
@@ -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<MessageRep*>(theAnswerRep.get());
-       Must(rep);
+    MessageRep *rep = dynamic_cast<MessageRep*>(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<libecap::Message> &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<MessageRep*>(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<size_t>(s);
+        haveSize - offset : static_cast<size_t>(s);
 
     // XXX: optimize by making theBody a shared_ptr (see Area::FromTemp*() src)
     return libecap::Area::FromTempBuffer(p->buf().content() + offset,
-               min(static_cast<size_t>(haveSize - offset), size));
+        min(static_cast<size_t>(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<MessageRep*>(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);
 
index 2386d4064c43884ca8f021bf3a04ccacc91c39a9..cf979fc43b739597cb8fe9d3d1ef0d78bcc43e79 100644 (file)
@@ -28,8 +28,8 @@ public:
     XactionRep(Adaptation::Initiator *anInitiator, HttpMsg *virginHeader, HttpRequest *virginCause, const Adaptation::ServicePointer &service);
     virtual ~XactionRep();
 
-       typedef libecap::shared_ptr<libecap::adapter::Xaction> AdapterXaction;
-       void master(const AdapterXaction &aMaster); // establish a link
+    typedef libecap::shared_ptr<libecap::adapter::Xaction> 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<BodyPipe> 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<libecap::Message> MessagePtr;
-       MessagePtr theAnswerRep;
+    typedef libecap::shared_ptr<libecap::Message> 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