]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Thu, 10 Mar 2011 01:12:44 +0000 (18:12 -0700)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Thu, 10 Mar 2011 01:12:44 +0000 (18:12 -0700)
src/Server.cc
src/adaptation/Initiator.h
src/adaptation/ecap/Config.h
src/adaptation/ecap/XactionRep.cc
src/client_side_request.cc

index 20b44e6772fdb1521caebd9f9e93a07514e6a3f2..66fd66ceb62b661e6c815fe8c75be657da54674f 100644 (file)
@@ -799,12 +799,12 @@ ServerStateData::handleAdaptationBlocked(const Adaptation::Answer &answer)
         return;
 
     if (!entry->isEmpty()) { // too late to block (should not really happen)
-       if (request)
-           request->detailError(ERR_ICAP_FAILURE, ERR_DETAIL_RESPMOD_BLOCK_LATE);
-       abortTransaction("late adaptation block");
-       return;
+        if (request)
+            request->detailError(ERR_ICAP_FAILURE, ERR_DETAIL_RESPMOD_BLOCK_LATE);
+        abortTransaction("late adaptation block");
+        return;
     }
-      
+
     debugs(11,7, HERE << "creating adaptation block response");
 
     err_type page_id =
index a17c5cdf42f1dea8a8d7514744fdfeab6d09f228..912f570897c979194bda454a555865ca4b6a88f7 100644 (file)
@@ -21,7 +21,8 @@ namespace Adaptation
 {
 
 /// summarizes adaptation service answer for the noteAdaptationAnswer() API
-class Answer {
+class Answer
+{
 public:
     /// helps interpret other members without a class hierarchy
     typedef enum {
index 79d65c7ee91093b0104138997e4d5afe71aaee8c..e541ef43505419b2ef1fd41bf5caa323b8b1a9cf 100644 (file)
@@ -17,7 +17,8 @@ namespace Ecap
 {
 
 /// eCAP service configuration
-class ServiceConfig: public Adaptation::ServiceConfig {
+class ServiceConfig: public Adaptation::ServiceConfig
+{
 public:
     // Adaptation::ServiceConfig API
     virtual bool grokExtension(const char *name, const char *value);
index 12b5852175fc6df4c8aff98c0e6bb686894a0e36..20bb82c3188d31383e5369bf9fd04108a50cf9a4 100644 (file)
@@ -28,8 +28,7 @@ public:
     OptionsExtractor(HttpHeader &aMeta): meta(aMeta) {}
 
     // libecap::NamedValueVisitor API
-    virtual void visit(const Name &name, const Area &value)
-    {
+    virtual void visit(const Name &name, const Area &value) {
         meta.putExt(name.image().c_str(), value.toString().c_str());
     }
 
@@ -92,14 +91,14 @@ void
 Adaptation::Ecap::XactionRep::visitEachOption(libecap::NamedValueVisitor &visitor) const
 {
     if (const libecap::Area value = clientIpValue())
-       visitor.visit(libecap::metaClientIp, value);
+        visitor.visit(libecap::metaClientIp, value);
     if (const libecap::Area value = usernameValue())
-       visitor.visit(libecap::metaUserName, value);
+        visitor.visit(libecap::metaUserName, value);
 
     if (Adaptation::Config::masterx_shared_name) {
-       const libecap::Name name(Adaptation::Config::masterx_shared_name);
-       if (const libecap::Area value = masterxSharedValue(name))
-           visitor.visit(name, value);
+        const libecap::Name name(Adaptation::Config::masterx_shared_name);
+        if (const libecap::Area value = masterxSharedValue(name))
+            visitor.visit(name, value);
     }
 
     // TODO: metaServerIp, metaAuthenticatedUser, and metaAuthenticatedGroups
@@ -118,7 +117,7 @@ Adaptation::Ecap::XactionRep::clientIpValue() const
 #if FOLLOW_X_FORWARDED_FOR
         if (TheConfig.use_indirect_client) {
             client_addr = request->indirect_client_addr;
-               } else
+        } else
 #endif
             client_addr = request->client_addr;
         if (!client_addr.IsAnyAddr() && !client_addr.IsNoAddr()) {
@@ -126,7 +125,7 @@ Adaptation::Ecap::XactionRep::clientIpValue() const
             client_addr.NtoA(ntoabuf,MAX_IPSTRLEN);
             return libecap::Area::FromTempBuffer(ntoabuf, strlen(ntoabuf));
         }
-       }
+    }
     return libecap::Area();
 }
 
@@ -139,7 +138,7 @@ Adaptation::Ecap::XactionRep::usernameValue() const
     if (request->auth_user_request != NULL) {
         if (char const *name = request->auth_user_request->username())
             return libecap::Area::FromTempBuffer(name, strlen(name));
-       }
+    }
     return libecap::Area();
 }
 
@@ -615,8 +614,7 @@ Adaptation::Ecap::XactionRep::status() const
     const BodyPipePointer &vp = theVirginRep.raw().body_pipe;
     if (!vp)
         buf.append(" !V", 3);
-    else
-    if (vp->stillConsuming(const_cast<XactionRep*>(this)))
+    else if (vp->stillConsuming(const_cast<XactionRep*>(this)))
         buf.append(" Vc", 3);
     else
         buf.append(" V?", 3);
index e6527d5ca39abcafe26a61e334bfaa6f668f310e..e5110981bc16b47e47777ebf752a8eabc02ac144 100644 (file)
@@ -1427,7 +1427,7 @@ ClientHttpRequest::noteAdaptationAnswer(const Adaptation::Answer &answer)
 }
 
 void
-ClientHttpRequest::handleAdaptedHeader(HttpMsg *msg)    
+ClientHttpRequest::handleAdaptedHeader(HttpMsg *msg)
 {
     assert(msg);