]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorSource Maintenance <squidadm@squid-cache.org>
Mon, 1 Aug 2016 12:12:15 +0000 (12:12 +0000)
committerSource Maintenance <squidadm@squid-cache.org>
Mon, 1 Aug 2016 12:12:15 +0000 (12:12 +0000)
src/Downloader.cc
src/Downloader.h
src/security/PeerConnector.cc
src/security/PeerConnector.h
src/ssl/bio.cc
src/ssl/support.cc

index 7a05a5970a5333ca6c4d89ab3a03337902d34426..94d90f9ca2863259f8c6c16b69842af55c0dce34 100644 (file)
@@ -8,8 +8,8 @@
 
 #include "squid.h"
 #include "client_side.h"
-#include "client_side_request.h"
 #include "client_side_reply.h"
+#include "client_side_request.h"
 #include "ClientRequestContext.h"
 #include "Downloader.h"
 #include "http/one/RequestParser.h"
@@ -85,7 +85,7 @@ downloaderRecipient(clientStreamNode * node, ClientHttpRequest * http,
                     HttpReply * rep, StoreIOBuffer receivedData)
 {
     debugs(33, 6, MYNAME);
-     /* Test preconditions */
+    /* Test preconditions */
     assert(node);
 
     /* TODO: handle this rather than asserting
@@ -112,7 +112,7 @@ downloaderDetach(clientStreamNode * node, ClientHttpRequest * http)
 /// Initializes and starts the HTTP GET request to the remote server
 bool
 Downloader::buildRequest()
-{ 
+{
     const HttpRequestMethod method = Http::METHOD_GET;
 
     char *uri = xstrdup(url_.c_str());
@@ -211,7 +211,7 @@ Downloader::handleReply(clientStreamNode * node, ClientHttpRequest *http, HttpRe
         tempBuffer.length = HTTP_REQBUF_SZ;
         clientStreamRead(node, http, tempBuffer);
     }
-        break;
+    break;
     case STREAM_COMPLETE:
         debugs(33, 3, "Object data transfer successfully complete");
         callBack(Http::scOkay);
@@ -233,8 +233,8 @@ void
 Downloader::downloadFinished()
 {
     debugs(33, 7, this);
-    // We cannot delay http destruction until refcounting deletes 
-    // DownloaderContext. The http object destruction will cause 
+    // We cannot delay http destruction until refcounting deletes
+    // DownloaderContext. The http object destruction will cause
     // clientStream cleanup and will release the refcount to context_
     // object hold by clientStream structures.
     context_->finished();
@@ -247,20 +247,20 @@ Downloader::downloadFinished()
 void
 Downloader::callBack(Http::StatusCode const statusCode)
 {
-     CbDialer *dialer = dynamic_cast<CbDialer*>(callback_->getDialer());
-     Must(dialer);
-     dialer->status = statusCode;
-     if (statusCode == Http::scOkay)
-         dialer->object = object_;
-     ScheduleCallHere(callback_);
-     callback_ = nullptr;
-
-     // Calling deleteThis method here to finish Downloader
-     // may result to squid crash.
-     // This method called by handleReply method which maybe called
-     // by ClientHttpRequest::doCallouts. The doCallouts after this object
-     // deleted, may operate on non valid objects.
-     // Schedule an async call here just to force squid to delete this object.
-     CallJobHere(33, 7, CbcPointer<Downloader>(this), Downloader, downloadFinished);
+    CbDialer *dialer = dynamic_cast<CbDialer*>(callback_->getDialer());
+    Must(dialer);
+    dialer->status = statusCode;
+    if (statusCode == Http::scOkay)
+        dialer->object = object_;
+    ScheduleCallHere(callback_);
+    callback_ = nullptr;
+
+    // Calling deleteThis method here to finish Downloader
+    // may result to squid crash.
+    // This method called by handleReply method which maybe called
+    // by ClientHttpRequest::doCallouts. The doCallouts after this object
+    // deleted, may operate on non valid objects.
+    // Schedule an async call here just to force squid to delete this object.
+    CallJobHere(33, 7, CbcPointer<Downloader>(this), Downloader, downloadFinished);
 }
 
index d15ec32081ab315350e296ca249216b04361487d..7c681ed3cbf57335aa84b01ccaa92d3d0fa66184 100644 (file)
@@ -53,7 +53,7 @@ public:
 
     /// The nested level of Downloader object (downloads inside downloads).
     unsigned int nestedLevel() const {return level_;}
-    
+
     void handleReply(clientStreamNode *, ClientHttpRequest *, HttpReply *, StoreIOBuffer);
 
 protected:
@@ -80,3 +80,4 @@ private:
 };
 
 #endif
+
index 720ffa7f031b30f5c46f1e2c5af6f99b569a9a6a..5d3022636d70356ced11f1f2ac5749517edb1bbd 100644 (file)
@@ -562,8 +562,8 @@ void
 Security::PeerConnector::startCertDownloading(SBuf &url)
 {
     AsyncCall::Pointer certCallback = asyncCall(81, 4,
-                                            "Security::PeerConnector::certDownloadingDone",
-                                            PeerConnectorCertDownloaderDialer(&Security::PeerConnector::certDownloadingDone, this));
+                                      "Security::PeerConnector::certDownloadingDone",
+                                      PeerConnectorCertDownloaderDialer(&Security::PeerConnector::certDownloadingDone, this));
 
     const Downloader *csd = dynamic_cast<const Downloader*>(request->downloader.valid());
     Downloader *dl = new Downloader(url, certCallback, csd ? csd->nestedLevel() + 1 : 1);
@@ -642,3 +642,4 @@ Security::PeerConnector::checkForMissingCertificates()
     return false;
 }
 #endif //USE_OPENSSL
+
index fad47517cdc76bed7a1a2891af86eb391cc9db63..2480ddf343d5570625f9a05775a7ca3b52d8ce0b 100644 (file)
@@ -128,7 +128,7 @@ protected:
 
 #if USE_OPENSSL
     /// Run the certificates list sent by the SSL server and check if there
-    /// are missing certificates. Adds to the urlOfMissingCerts list the 
+    /// are missing certificates. Adds to the urlOfMissingCerts list the
     /// URLS of missing certificates if this information provided by the
     /// issued certificates with Authority Info Access extension.
     bool checkForMissingCertificates();
index c048d07f54c711049411545b554fc2ae9340e7be..aad25584882e1a1782f2cb0e3946331901e27839 100644 (file)
@@ -277,9 +277,9 @@ Ssl::ServerBio::readAndParse(char *buf, const int size, BIO *table)
     }
 
     if (holdRead_) {
-         debugs(83, 7, "Hold flag is set, retry latter. (Hold " << size << "bytes)");
-         BIO_set_retry_read(table);
-         return -1;
+        debugs(83, 7, "Hold flag is set, retry latter. (Hold " << size << "bytes)");
+        BIO_set_retry_read(table);
+        return -1;
     }
 
     return giveBuffered(buf, size);
index d788b728861f4061b9139520861a4292254a48fd..3ba143a72d822a2c661e6d0aefc322a5d5d12566 100644 (file)
@@ -1182,7 +1182,7 @@ Ssl::uriOfIssuerIfMissing(X509 *cert, Security::CertList const &serverCertificat
     if (!findCertIssuer(serverCertificates, cert)) {
         //if issuer is missing
         if (!findCertIssuerFast(SquidUntrustedCerts, cert)) {
-            // and issuer not found in local untrusted certificates database 
+            // and issuer not found in local untrusted certificates database
             if (const char *issuerUri = hasAuthorityInfoAccessCaIssuers(cert)) {
                 // There is a URI where we can download a certificate.
                 return issuerUri;