]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Sat, 18 Jun 2011 00:12:51 +0000 (18:12 -0600)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Sat, 18 Jun 2011 00:12:51 +0000 (18:12 -0600)
25 files changed:
doc/debug-sections.txt
scripts/mk-error-details-po.pl [changed mode: 0644->0755]
src/ProtoPort.cc
src/client_side.cc
src/comm/ConnOpener.cc
src/comm/ConnOpener.h
src/comm/Connection.h
src/comm/ModPoll.cc
src/comm/forward.h
src/errorpage.cc
src/errorpage.h
src/gopher.cc
src/helper.cc
src/http.cc
src/ident/Ident.cc
src/ip/QosConfig.h
src/ipc/Coordinator.cc
src/ipcache.h
src/pconn.cc
src/peer_select.cc
src/ssl/ErrorDetail.cc
src/ssl/ErrorDetailManager.cc
src/ssl/ErrorDetailManager.h
src/tunnel.cc
src/whois.cc

index 4ab90d7ef3e4249b26f3d7a5fa3a3f13765cce43..0fc9d5f877bf988ca935b57cf5b58681871d5c8f 100644 (file)
@@ -18,6 +18,7 @@ section 03    Configuration Settings
 section 04    Error Generation
 section 05    Comm
 section 05    Listener Socket Handler
+section 05    Socket Connection Opener
 section 05    Socket Functions
 section 06    Disk I/O Routines
 section 07    Multicast
old mode 100644 (file)
new mode 100755 (executable)
index f9b37e292e6deca28b16bd8cf032e25505b1f522..d558751c9994d831e7711f72f401fd12f0e5475e 100644 (file)
@@ -11,7 +11,8 @@
 
 http_port_list::http_port_list(const char *aProtocol)
 #if USE_SSL
-        : http(*this),
+        :
+        http(*this),
         dynamicCertMemCacheSize(std::numeric_limits<size_t>::max())
 #endif
 {
index 4a709fc9ba8face20eabd27f529430c0b57f815a..e6e3181e9dff51c2b656cb751000158340d1bf1f 100644 (file)
@@ -2733,7 +2733,7 @@ ConnStateData::clientParseRequests()
         if (context) {
             debugs(33, 5, HERE << clientConnection << ": parsed a request");
             AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "clientLifetimeTimeout",
-                                                        CommTimeoutCbPtrFun(clientLifetimeTimeout, context->http));
+                                             CommTimeoutCbPtrFun(clientLifetimeTimeout, context->http));
             commSetConnTimeout(clientConnection, Config.Timeout.lifetime, timeoutCall);
 
             clientProcessRequest(this, &parser_, context, method, http_ver);
index dd1b360f767348825e727966929694fb9183bd0e..e5417ce093e1a4b8be6537af89488bcb4006121d 100644 (file)
@@ -12,8 +12,9 @@
 #include "ipcache.h"
 #include "SquidTime.h"
 
-namespace Comm {
-    CBDATA_CLASS_INIT(ConnOpener);
+namespace Comm
+{
+CBDATA_CLASS_INIT(ConnOpener);
 };
 
 Comm::ConnOpener::ConnOpener(Comm::ConnectionPointer &c, AsyncCall::Pointer &handler, time_t ctimeout) :
@@ -232,7 +233,7 @@ Comm::ConnOpener::connect()
         failRetries_++;
 
         // check for timeout FIRST.
-        if(squid_curtime - connectStart_ > connectTimeout_) {
+        if (squid_curtime - connectStart_ > connectTimeout_) {
             debugs(5, 5, HERE << conn_ << ": * - ERR took too long to receive response.");
             calls_.earlyAbort_->cancel("Comm::ConnOpener::connect timed out");
             calls_.earlyAbort_ = NULL;
index 594fe61993fd2e1a4e95667b482ed9ed03488895..06ace783dc3b25c89523114b7df6addbeb6fb012 100644 (file)
@@ -8,7 +8,8 @@
 #include "comm_err_t.h"
 #include "comm/forward.h"
 
-namespace Comm {
+namespace Comm
+{
 
 /**
  * Async-opener of a Comm connection.
index 4245225c8a8b882710bcd03f12fc757275eeed2d..3b7e4e66144887de539431463641f22082dc6086 100644 (file)
@@ -58,7 +58,8 @@
 
 struct peer;
 
-namespace Comm {
+namespace Comm
+{
 
 /* TODO: make these a struct of boolean flags members in the connection instead of a bitmap.
  * we can't do that until all non-comm code uses Commm::Connection objects to create FD
index 2f31d99a1627e099026ad030bf143d86fc0b62a7..0d80fb47138f8088850798db6a9f3ac3ef3fd687 100644 (file)
@@ -285,7 +285,7 @@ comm_poll_icp_incoming(void)
         fds[nfds++] = icpIncomingConn->fd;
 
     if (icpIncomingConn != icpOutgoingConn && Comm::IsConnOpen(icpOutgoingConn))
-            fds[nfds++] = icpOutgoingConn->fd;
+        fds[nfds++] = icpOutgoingConn->fd;
 
     if (nfds == 0)
         return;
index a08d82ea4faf60a861e02bcf05d63a0555add26f..ad333d0900d41b206af9496022c8e009d1278c46 100644 (file)
@@ -4,7 +4,8 @@
 #include "Array.h"
 #include "RefCount.h"
 
-namespace Comm {
+namespace Comm
+{
 
 class Connection;
 
index 97b10d1797581eecf8d8104812a05741149ba3bc..7a6d7a683f69504c37ed2d6e131e9426cbc93f87 100644 (file)
@@ -136,7 +136,8 @@ static IOCB errorSendComplete;
 
 /// \ingroup ErrorPageInternal
 /// manages an error page template
-class ErrorPageFile: public TemplateFile {
+class ErrorPageFile: public TemplateFile
+{
 public:
     ErrorPageFile(const char *name): TemplateFile(name) { textBuf.init();}
 
@@ -366,14 +367,13 @@ TemplateFile::loadFromFile(const char *path)
 
 bool strHdrAcptLangGetItem(const String &hdr, char *lang, int langLen, size_t &pos)
 {
-    while(pos < hdr.size()) {
+    while (pos < hdr.size()) {
         char *dt = lang;
 
         if (!pos) {
             /* skip any initial whitespace. */
             while (pos < hdr.size() && xisspace(hdr[pos])) pos++;
-        }
-        else {
+        } else {
             // IFF we terminated the tag on whitespace or ';' we need to skip to the next ',' or end of header.
             while (pos < hdr.size() && hdr[pos] != ',') pos++;
             if (hdr[pos] == ',') pos++;
index ab355f990a6a4b3b297b862546e864bc6e8c91d5..8eb3cb0caef21b7e6258d35d91c11c13016697b1 100644 (file)
@@ -256,10 +256,11 @@ SQUIDCEXTERN const char *errorPageName(int pageId); ///< error ID to string
  * loads text templates used for error pages and details;
  * supports translation of templates
  */
-class TemplateFile {
+class TemplateFile
+{
 public:
     TemplateFile(const char *name);
-    virtual ~TemplateFile(){}
+    virtual ~TemplateFile() {}
 
     /// return true if the data loaded from disk without any problem
     bool loaded() const {return wasLoaded;}
index 605074e80aaeee05643c1d65fe4b7a11cbf00db7..a83991dcddc2f317fdf632febd10b0c70735aa2a 100644 (file)
@@ -1036,6 +1036,6 @@ gopherStart(FwdState * fwd)
     gopherState->serverConn = fwd->serverConnection();
     gopherSendRequest(fwd->serverConnection()->fd, gopherState);
     AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "gopherTimeout",
-                                                CommTimeoutCbPtrFun(gopherTimeout, gopherState));
+                                     CommTimeoutCbPtrFun(gopherTimeout, gopherState));
     commSetConnTimeout(fwd->serverConnection(), Config.Timeout.read, timeoutCall);
 }
index 9099fd9fe79b28bdb69870b0feb3be86ad1a80aa..c1332329af34057a7ae11df0fe03efa8c7239dd9 100644 (file)
@@ -93,15 +93,15 @@ HelperServerBase::closePipesSafely()
     writePipe->close();
 
 #ifdef _SQUID_MSWIN_
-        if (hIpc) {
-            if (WaitForSingleObject(hIpc, 5000) != WAIT_OBJECT_0) {
-                getCurrentTime();
-                debugs(84, DBG_IMPORTANT, "WARNING: " << hlp->id_name <<
-                       " #" << no << " (" << hlp->cmdline->key << "," <<
-                       (long int)pid << ") didn't exit in 5 seconds");
-            }
-            CloseHandle(hIpc);
+    if (hIpc) {
+        if (WaitForSingleObject(hIpc, 5000) != WAIT_OBJECT_0) {
+            getCurrentTime();
+            debugs(84, DBG_IMPORTANT, "WARNING: " << hlp->id_name <<
+                   " #" << no << " (" << hlp->cmdline->key << "," <<
+                   (long int)pid << ") didn't exit in 5 seconds");
         }
+        CloseHandle(hIpc);
+    }
 #endif
 }
 
@@ -120,15 +120,15 @@ HelperServerBase::closeWritePipeSafely()
     writePipe->close();
 
 #ifdef _SQUID_MSWIN_
-        if (hIpc) {
-            if (WaitForSingleObject(hIpc, 5000) != WAIT_OBJECT_0) {
-                getCurrentTime();
-                debugs(84, DBG_IMPORTANT, "WARNING: " << hlp->id_name <<
-                       " #" << no << " (" << hlp->cmdline->key << "," <<
-                       (long int)pid << ") didn't exit in 5 seconds");
-            }
-            CloseHandle(hIpc);
+    if (hIpc) {
+        if (WaitForSingleObject(hIpc, 5000) != WAIT_OBJECT_0) {
+            getCurrentTime();
+            debugs(84, DBG_IMPORTANT, "WARNING: " << hlp->id_name <<
+                   " #" << no << " (" << hlp->cmdline->key << "," <<
+                   (long int)pid << ") didn't exit in 5 seconds");
         }
+        CloseHandle(hIpc);
+    }
 #endif
 }
 
index 2c1c57529b8f1114cdc93a7338ec0ff91ece874c..114b9b7190341989b1722b358550ff51d79469fa 100644 (file)
@@ -1395,8 +1395,7 @@ HttpStateData::processReplyBody()
         (void) 0;
     } else
         switch (persistentConnStatus()) {
-        case INCOMPLETE_MSG:
-            {
+        case INCOMPLETE_MSG: {
             debugs(11, 5, "processReplyBody: INCOMPLETE_MSG from " << serverConnection);
             /* Wait for more data or EOF condition */
             AsyncCall::Pointer nil;
@@ -1407,8 +1406,8 @@ HttpStateData::processReplyBody()
             }
 
             flags.do_next_read = 1;
-            }
-            break;
+        }
+        break;
 
         case COMPLETE_PERSISTENT_MSG:
             debugs(11, 5, "processReplyBody: COMPLETE_PERSISTENT_MSG from " << serverConnection);
index 04a6ae87048489c04275730bfee8e9f0a77248fe..ace6e3c0dd1308bf6358a8e5b93681791e06bb23 100644 (file)
@@ -157,10 +157,10 @@ Ident::ConnectDone(const Comm::ConnectionPointer &conn, comm_err_t status, int x
     AsyncCall::Pointer nil;
     Comm::Write(conn, &mb, nil);
     AsyncCall::Pointer readCall = commCbCall(5,4, "Ident::ReadReply",
-                                             CommIoCbPtrFun(Ident::ReadReply, state));
+                                  CommIoCbPtrFun(Ident::ReadReply, state));
     comm_read(conn, state->buf, IDENT_BUFSIZE, readCall);
     AsyncCall::Pointer timeoutCall = commCbCall(5,4, "Ident::Timeout",
-                                                CommTimeoutCbPtrFun(Ident::Timeout, state));
+                                     CommTimeoutCbPtrFun(Ident::Timeout, state));
     commSetConnTimeout(conn, Ident::TheConfig.timeout, timeoutCall);
 }
 
index b9f2765afca4c1d670933a1010b9d543d574feab..b8df06c196bdf37f7da6b04235f3091d6b248471 100644 (file)
@@ -29,88 +29,88 @@ namespace Ip
 namespace Qos
 {
 
-    /**
-    * Function to retrieve the TOS value of the inbound packet.
-    * Called by FwdState::dispatch if QOS options are enabled.
-    * Bug 2537: This part of ZPH only applies to patched Linux kernels
-    * @param server    Server side descriptor of connection to get TOS for
-    * @param clientFde Pointer to client side fde instance to set tosFromServer in
-    */
-    void getTosFromServer(const Comm::ConnectionPointer &server, fde *clientFde);
+/**
+* Function to retrieve the TOS value of the inbound packet.
+* Called by FwdState::dispatch if QOS options are enabled.
+* Bug 2537: This part of ZPH only applies to patched Linux kernels
+* @param server    Server side descriptor of connection to get TOS for
+* @param clientFde Pointer to client side fde instance to set tosFromServer in
+*/
+void getTosFromServer(const Comm::ConnectionPointer &server, fde *clientFde);
 
-    /**
-    * Function to retrieve the netfilter mark value of the connection
-    * to the upstream server. Called by FwdState::dispatch if QOS
-    * options are enabled.
-    * @param server    Server side descriptor of connection to get mark for
-    * @param clientFde Pointer to client side fde instance to set nfmarkFromServer in
-    */
-    void getNfmarkFromServer(const Comm::ConnectionPointer &server, const fde *clientFde);
+/**
+* Function to retrieve the netfilter mark value of the connection
+* to the upstream server. Called by FwdState::dispatch if QOS
+* options are enabled.
+* @param server    Server side descriptor of connection to get mark for
+* @param clientFde Pointer to client side fde instance to set nfmarkFromServer in
+*/
+void getNfmarkFromServer(const Comm::ConnectionPointer &server, const fde *clientFde);
 
 #if USE_LIBNETFILTERCONNTRACK
-    /**
-    * Callback function to mark connection once it's been found.
-    * This function is called by the libnetfilter_conntrack
-    * libraries, during nfct_query in Ip::Qos::getNfmarkFromServer.
-    * nfct_callback_register is used to register this function.
-    * @param nf_conntrack_msg_type Type of conntrack message
-    * @param nf_conntrack Pointer to the conntrack structure
-    * @param clientFde Pointer to client side fde instance to set nfmarkFromServer in
-    */
-    int getNfMarkCallback(enum nf_conntrack_msg_type type, struct nf_conntrack *ct, void *clientFde);
+/**
+* Callback function to mark connection once it's been found.
+* This function is called by the libnetfilter_conntrack
+* libraries, during nfct_query in Ip::Qos::getNfmarkFromServer.
+* nfct_callback_register is used to register this function.
+* @param nf_conntrack_msg_type Type of conntrack message
+* @param nf_conntrack Pointer to the conntrack structure
+* @param clientFde Pointer to client side fde instance to set nfmarkFromServer in
+*/
+int getNfMarkCallback(enum nf_conntrack_msg_type type, struct nf_conntrack *ct, void *clientFde);
 #endif
 
-    /**
-    * Function to work out and then apply to the socket the appropriate
-    * TOS value to set on packets when items have not been retrieved from
-    * local cache. Called by clientReplyContext::sendMoreData if QOS is
-    * enabled for TOS.
-    * @param conn     Descriptor of socket to set the TOS for
-    * @param hierCode Hier code of request
-    */
-    int doTosLocalMiss(const Comm::ConnectionPointer &conn, const hier_code hierCode);
+/**
+* Function to work out and then apply to the socket the appropriate
+* TOS value to set on packets when items have not been retrieved from
+* local cache. Called by clientReplyContext::sendMoreData if QOS is
+* enabled for TOS.
+* @param conn     Descriptor of socket to set the TOS for
+* @param hierCode Hier code of request
+*/
+int doTosLocalMiss(const Comm::ConnectionPointer &conn, const hier_code hierCode);
 
-    /**
-    * Function to work out and then apply to the socket the appropriate
-    * netfilter mark value to set on packets when items have not been
-    * retrieved from local cache. Called by clientReplyContext::sendMoreData
-    * if QOS is enabled for TOS.
-    * @param conn     Descriptor of socket to set the mark for
-    * @param hierCode Hier code of request
-    */
-    int doNfmarkLocalMiss(const Comm::ConnectionPointer &conn, const hier_code hierCode);
+/**
+* Function to work out and then apply to the socket the appropriate
+* netfilter mark value to set on packets when items have not been
+* retrieved from local cache. Called by clientReplyContext::sendMoreData
+* if QOS is enabled for TOS.
+* @param conn     Descriptor of socket to set the mark for
+* @param hierCode Hier code of request
+*/
+int doNfmarkLocalMiss(const Comm::ConnectionPointer &conn, const hier_code hierCode);
 
-    /**
-    * Function to work out and then apply to the socket the appropriate
-    * TOS value to set on packets when items *have* been retrieved from
-    * local cache. Called by clientReplyContext::doGetMoreData if QOS is
-    * enabled for TOS.
-    * @param conn Descriptor of socket to set the TOS for
-    */
-    int doTosLocalHit(const Comm::ConnectionPointer &conn);
+/**
+* Function to work out and then apply to the socket the appropriate
+* TOS value to set on packets when items *have* been retrieved from
+* local cache. Called by clientReplyContext::doGetMoreData if QOS is
+* enabled for TOS.
+* @param conn Descriptor of socket to set the TOS for
+*/
+int doTosLocalHit(const Comm::ConnectionPointer &conn);
 
-    /**
-    * Function to work out and then apply to the socket the appropriate
-    * netfilter mark value to set on packets when items *have* been
-    * retrieved from local cache. Called by clientReplyContext::doGetMoreData
-    * if QOS is enabled for TOS.
-    * @param conn Descriptor of socket to set the mark for
-    */
-    int doNfmarkLocalHit(const Comm::ConnectionPointer &conn);
+/**
+* Function to work out and then apply to the socket the appropriate
+* netfilter mark value to set on packets when items *have* been
+* retrieved from local cache. Called by clientReplyContext::doGetMoreData
+* if QOS is enabled for TOS.
+* @param conn Descriptor of socket to set the mark for
+*/
+int doNfmarkLocalHit(const Comm::ConnectionPointer &conn);
 
-    /**
-    * Function to set the TOS value of packets. Sets the value on the socket
-    * which then gets copied to the packets.
-    * @param conn Descriptor of socket to set the TOS for
-    */
-    _SQUID_INLINE_ int setSockTos(const Comm::ConnectionPointer &conn, tos_t tos);
+/**
+* Function to set the TOS value of packets. Sets the value on the socket
+* which then gets copied to the packets.
+* @param conn Descriptor of socket to set the TOS for
+*/
+_SQUID_INLINE_ int setSockTos(const Comm::ConnectionPointer &conn, tos_t tos);
 
-    /**
-    * Function to set the netfilter mark value of packets. Sets the value on the
-    * socket which then gets copied to the packets. Called from Ip::Qos::doNfmarkLocalMiss
-    * @param conn Descriptor of socket to set the mark for
-    */
-    _SQUID_INLINE_ int setSockNfmark(const Comm::ConnectionPointer &conn, nfmark_t mark);
+/**
+* Function to set the netfilter mark value of packets. Sets the value on the
+* socket which then gets copied to the packets. Called from Ip::Qos::doNfmarkLocalMiss
+* @param conn Descriptor of socket to set the mark for
+*/
+_SQUID_INLINE_ int setSockNfmark(const Comm::ConnectionPointer &conn, nfmark_t mark);
 
 /**
  * QOS configuration class. Contains all the parameters for QOS functions as well
index c6948c6aa62ff1aff15529526a417b4881a68df5..96c3950362c5605a8d2431651291a9c7db8b3bcb 100644 (file)
@@ -122,7 +122,7 @@ Ipc::Coordinator::handleSharedListenRequest(const SharedListenRequest& request)
     Listeners::const_iterator i = listeners.find(request.params);
     int errNo = 0;
     const Comm::ConnectionPointer c = (i != listeners.end()) ?
-                     i->second : openListenSocket(request, errNo);
+                                      i->second : openListenSocket(request, errNo);
 
     debugs(54, 3, HERE << "sending shared listen " << c << " for " <<
            request.params.addr << " to kid" << request.requestorId <<
index e98e4d8687774d1892a995ff7408ef1291d7084f..6395d3160e44875312179691a6aa09a8cda28a4c 100644 (file)
@@ -1,7 +1,8 @@
 #ifndef _SQUID_IPCACHE_H
 #define _SQUID_IPCACHE_H
 
-namespace Ip {
+namespace Ip
+{
 class Address;
 }
 
index a5e101e7bc47cd6bd42ab64428f84b138d41a266..63dff19f2a6427fdf873e7dd24566c6f9fb37255 100644 (file)
@@ -144,7 +144,7 @@ IdleConnList::closeN(size_t n)
                 parent_->noteConnectionRemoved();
         }
         // shuffle the list N down.
-        for (;index < (size_t)size_; index++) {
+        for (; index < (size_t)size_; index++) {
             theList_[index - n] = theList_[index];
         }
         // ensure the last N entries are unset
@@ -186,10 +186,10 @@ IdleConnList::push(const Comm::ConnectionPointer &conn)
 
     theList_[size_++] = conn;
     AsyncCall::Pointer readCall = commCbCall(5,4, "IdleConnList::Read",
-                                             CommIoCbPtrFun(IdleConnList::Read, this));
+                                  CommIoCbPtrFun(IdleConnList::Read, this));
     comm_read(conn, fakeReadBuf_, sizeof(fakeReadBuf_), readCall);
     AsyncCall::Pointer timeoutCall = commCbCall(5,4, "IdleConnList::Read",
-                                                CommTimeoutCbPtrFun(IdleConnList::Timeout, this));
+                                     CommTimeoutCbPtrFun(IdleConnList::Timeout, this));
     commSetConnTimeout(conn, Config.Timeout.pconn, timeoutCall);
 }
 
index 32019063958508bd3a1abace736e986c67d0fa0b..c5e13566bf54feb8180f32875414cbf0df57c438 100644 (file)
@@ -253,7 +253,7 @@ peerSelectDnsResults(const ipcache_addrs *ia, const DnsLookupDetails &details, v
 
             // for TPROXY we must skip unusable addresses.
             if (psstate->request->flags.spoof_client_ip && !(fs->_peer && fs->_peer->options.no_tproxy) ) {
-                if(ia->in_addrs[n].IsIPv4() != psstate->request->client_addr.IsIPv4()) {
+                if (ia->in_addrs[n].IsIPv4() != psstate->request->client_addr.IsIPv4()) {
                     // we CAN'T spoof the address on this link. find another.
                     continue;
                 }
index e3171205a1420c982282e6ab55c702b155a7f5ad..23233980cd5ca0f1d7a5cc2c63e66822675be042 100644 (file)
@@ -5,7 +5,7 @@
 #include <map>
 #endif
 
-struct SslErrorEntry{
+struct SslErrorEntry {
     Ssl::ssl_error_t value;
     const char *name;
 };
index 7cd8a3711ee0b61fbc214977beeec28f7c56642f..4bfe6e5e623af564d9a6078079757d0404b95a47 100644 (file)
@@ -17,10 +17,12 @@ namespace Ssl
 {
 
 /// manages error detail templates
-class ErrorDetailFile : public TemplateFile{
+class ErrorDetailFile : public TemplateFile
+{
 public:
     explicit ErrorDetailFile(ErrorDetailsList::Pointer const details): TemplateFile("error-details.txt") {
-        buf.init(); theDetails = details;
+        buf.init();
+        theDetails = details;
     }
 
 private:
@@ -97,8 +99,8 @@ Ssl::ErrorDetailsList::Pointer Ssl::ErrorDetailsManager::getCachedDetails(const
     Cache::iterator it;
     it = cache.find(lang);
     if (it != cache.end()) {
-            debugs(83, 8, HERE << "Found template details in cache for language: " << lang);
-            return it->second;
+        debugs(83, 8, HERE << "Found template details in cache for language: " << lang);
+        return it->second;
     }
 
     return NULL;
@@ -130,7 +132,7 @@ Ssl::ErrorDetailsManager::getErrorDetail(Ssl::ssl_error_t value, HttpRequest *re
             debugs(83, 8, HERE << "Creating new ErrDetailList to read from disk");
             errDetails = new ErrorDetailsList();
             ErrorDetailFile detailTmpl(errDetails);
-            if(detailTmpl.loadFor(request)) {
+            if (detailTmpl.loadFor(request)) {
                 if (detailTmpl.language()) {
                     debugs(83, 8, HERE << "Found details on disk for language " << detailTmpl.language());
                     errDetails->errLanguage = detailTmpl.language();
@@ -166,7 +168,8 @@ Ssl::ErrorDetailsManager::getDefaultErrorDetail(Ssl::ssl_error_t value)
 }
 
 // Use HttpHeaders parser to parse error-details.txt files
-class DetailEntryParser: public HttpHeader {
+class DetailEntryParser: public HttpHeader
+{
 public:
     DetailEntryParser():HttpHeader(hoErrorDetail) {}
 };
@@ -194,8 +197,8 @@ Ssl::ErrorDetailFile::parse(const char *buffer, int len, bool eof)
         //ignore spaces, new lines and comment lines (starting with #) at the beggining
         const char *s;
         for (s = buf.content(); (*s == '\n' || *s == ' '  || *s == '\t' || *s == '#')  && s < e; s++) {
-            if(*s == '#')
-                while(s<e &&  *s != '\n') s++; // skip untill the end of line
+            if (*s == '#')
+                while (s<e &&  *s != '\n') s++; // skip untill the end of line
         }
 
         if ( s != e) {
index 2aeefc25ca7deacdecfe69ba13f8f63735b1b974..1a0be5926198d53bf8edbd682f60a63a88a90ec5 100644 (file)
@@ -13,7 +13,8 @@
 namespace Ssl
 {
 
-class ErrorDetailEntry {
+class ErrorDetailEntry
+{
 public:
     Ssl::ssl_error_t error_no; ///< The SSL error code
     String name; ///< a name for the error
@@ -46,7 +47,8 @@ public:
  * It is used to load, manage and query multiple ErrorDetailLists
  * objects.
  */
-class ErrorDetailsManager {
+class ErrorDetailsManager
+{
 public:
     ErrorDetailsManager();
 
index 50e5bde4d4acfc39d78c88708ca62344eef14149..083c6e95ca0ec9dde71f2770ccd53d2a9e56ace1 100644 (file)
@@ -309,7 +309,7 @@ TunnelStateData::copy (size_t len, comm_err_t errcode, int xerrno, Connection &f
     /* Bump the source connection read timeout on any activity */
     if (Comm::IsConnOpen(from.conn)) {
         AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "tunnelTimeout",
-                                                    CommTimeoutCbPtrFun(tunnelTimeout, this));
+                                         CommTimeoutCbPtrFun(tunnelTimeout, this));
         commSetConnTimeout(from.conn, Config.Timeout.read, timeoutCall);
     }
 
@@ -582,7 +582,7 @@ tunnelConnectDone(const Comm::ConnectionPointer &conn, comm_err_t status, int xe
     }
 
     AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "tunnelTimeout",
-                                                CommTimeoutCbPtrFun(tunnelTimeout, tunnelState));
+                                     CommTimeoutCbPtrFun(tunnelTimeout, tunnelState));
     commSetConnTimeout(conn, Config.Timeout.read, timeoutCall);
 }
 
@@ -642,7 +642,7 @@ tunnelStart(ClientHttpRequest * http, int64_t * size_ptr, int *status_ptr)
                            tunnelState);
 
     AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "tunnelTimeout",
-                                                CommTimeoutCbPtrFun(tunnelTimeout, tunnelState));
+                                     CommTimeoutCbPtrFun(tunnelTimeout, tunnelState));
     commSetConnTimeout(tunnelState->client.conn, Config.Timeout.lifetime, timeoutCall);
 
     peerSelect(&(tunnelState->serverDestinations), request,
@@ -676,11 +676,11 @@ tunnelRelayConnectRequest(const Comm::ConnectionPointer &srv, void *data)
     mb.append("\r\n", 2);
 
     AsyncCall::Pointer writeCall = commCbCall(5,5, "tunnelConnectedWriteDone",
-                                              CommIoCbPtrFun(tunnelConnectedWriteDone, tunnelState));
+                                   CommIoCbPtrFun(tunnelConnectedWriteDone, tunnelState));
     Comm::Write(srv, &mb, writeCall);
 
     AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "tunnelTimeout",
-                                                CommTimeoutCbPtrFun(tunnelTimeout, tunnelState));
+                                     CommTimeoutCbPtrFun(tunnelTimeout, tunnelState));
     commSetConnTimeout(srv, Config.Timeout.read, timeoutCall);
 }
 
index 56ed18c5e5a426679f143e5cad94f04dcaafb542..82dbc0f646e33a322f980e49ab4b74fc381c8484 100644 (file)
@@ -102,13 +102,13 @@ whoisStart(FwdState * fwd)
     snprintf(buf, l, SQUIDSTRINGPH"\r\n", SQUIDSTRINGPRINT(str_print));
 
     AsyncCall::Pointer writeCall = commCbCall(5,5, "whoisWriteComplete",
-                                              CommIoCbPtrFun(whoisWriteComplete, p));
+                                   CommIoCbPtrFun(whoisWriteComplete, p));
     Comm::Write(fwd->serverConnection(), buf, strlen(buf), writeCall, NULL);
     AsyncCall::Pointer readCall = commCbCall(5,4, "whoisReadReply",
-                                             CommIoCbPtrFun(whoisReadReply, p));
+                                  CommIoCbPtrFun(whoisReadReply, p));
     comm_read(fwd->serverConnection(), p->buf, BUFSIZ, readCall);
     AsyncCall::Pointer timeoutCall = commCbCall(5, 4, "whoisTimeout",
-                                                CommTimeoutCbPtrFun(whoisTimeout, p));
+                                     CommTimeoutCbPtrFun(whoisTimeout, p));
     commSetConnTimeout(fwd->serverConnection(), Config.Timeout.read, timeoutCall);
 }