From: Source Maintenance Date: Wed, 13 Jan 2016 12:12:11 +0000 (+0000) Subject: SourceFormat Enforcement X-Git-Tag: SQUID_4_0_5~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ff89bfa02dac2591454dacccee0fc3e26b3b137d;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/src/AclRegs.cc b/src/AclRegs.cc index 583acfa3c9..694243df75 100644 --- a/src/AclRegs.cc +++ b/src/AclRegs.cc @@ -234,3 +234,4 @@ ACLStrategised ACLSquidError::RegistryEntry_(new ACLSquidErrorData, AC ACL::Prototype Acl::ConnectionsEncrypted::RegistryProtoype(&Acl::ConnectionsEncrypted::RegistryEntry_, "connections_encrypted"); Acl::ConnectionsEncrypted Acl::ConnectionsEncrypted::RegistryEntry_("connections_encrypted"); + diff --git a/src/HttpMsg.h b/src/HttpMsg.h index 42c313642f..f783886d04 100644 --- a/src/HttpMsg.h +++ b/src/HttpMsg.h @@ -85,7 +85,7 @@ public: BodyPipe::Pointer body_pipe; // optional pipeline to receive message body - uint32_t sources; ///< The message sources + uint32_t sources; ///< The message sources // returns true and sets hdr_sz on success // returns false and sets *error to zero when needs more data diff --git a/src/acl/ConnectionsEncrypted.cc b/src/acl/ConnectionsEncrypted.cc index cb3200437e..199b13351f 100644 --- a/src/acl/ConnectionsEncrypted.cc +++ b/src/acl/ConnectionsEncrypted.cc @@ -1,5 +1,5 @@ /* - * Copyright (C) 1996-2015 The Squid Software Foundation and contributors + * Copyright (C) 1996-2016 The Squid Software Foundation and contributors * * Squid software is distributed under GPLv2+ license and includes * contributions from numerous individuals and organizations. @@ -9,11 +9,11 @@ /* DEBUG: section 28 Access Control */ #include "squid.h" -#include "acl/FilledChecklist.h" #include "acl/ConnectionsEncrypted.h" +#include "acl/FilledChecklist.h" #include "Debug.h" -#include "HttpRequest.h" #include "HttpReply.h" +#include "HttpRequest.h" #include "SquidConfig.h" ACL * @@ -61,11 +61,11 @@ Acl::ConnectionsEncrypted::match(ACLChecklist *checklist) } ACLFilledChecklist *filled = Filled((ACLChecklist*)checklist); - + const bool safeRequest = !(filled->request->sources & HttpMsg::srcUnsafe); const bool safeReply = !filled->reply || - !(filled->reply->sources & HttpMsg::srcUnsafe); + !(filled->reply->sources & HttpMsg::srcUnsafe); return (safeRequest && safeReply) ? 1 : 0; } diff --git a/src/acl/ConnectionsEncrypted.h b/src/acl/ConnectionsEncrypted.h index b01a79f487..d47edd068d 100644 --- a/src/acl/ConnectionsEncrypted.h +++ b/src/acl/ConnectionsEncrypted.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 1996-2015 The Squid Software Foundation and contributors + * Copyright (C) 1996-2016 The Squid Software Foundation and contributors * * Squid software is distributed under GPLv2+ license and includes * contributions from numerous individuals and organizations. @@ -12,7 +12,7 @@ #include "acl/Acl.h" #include "acl/Checklist.h" -namespace Acl +namespace Acl { class ConnectionsEncrypted : public ACL diff --git a/src/acl/DestinationIp.cc b/src/acl/DestinationIp.cc index 4b70d14733..80476c819f 100644 --- a/src/acl/DestinationIp.cc +++ b/src/acl/DestinationIp.cc @@ -40,7 +40,7 @@ ACLDestinationIP::match(ACLChecklist *cl) if (Config.onoff.client_dst_passthru && (checklist->request->flags.intercepted || checklist->request->flags.interceptTproxy)) { const auto conn = checklist->conn(); return (conn && conn->clientConnection) ? - ACLIP::match(conn->clientConnection->local) : -1; + ACLIP::match(conn->clientConnection->local) : -1; } if (flags.isSet(ACL_F_NO_LOOKUP)) { diff --git a/src/adaptation/Config.cc b/src/adaptation/Config.cc index 721db4b18e..6fd119691e 100644 --- a/src/adaptation/Config.cc +++ b/src/adaptation/Config.cc @@ -173,7 +173,7 @@ Adaptation::Config::dumpService(StoreEntry *entry, const char *name) const SQUIDSTRINGPRINT(cfg.key), cfg.methodStr(), cfg.vectPointStr(), cfg.bypass, SQUIDSTRINGPRINT(cfg.uri), - + optConnectionEncryption); } } diff --git a/src/adaptation/ecap/XactionRep.cc b/src/adaptation/ecap/XactionRep.cc index 46351c2841..080b022443 100644 --- a/src/adaptation/ecap/XactionRep.cc +++ b/src/adaptation/ecap/XactionRep.cc @@ -739,3 +739,4 @@ Adaptation::Ecap::XactionRep::updateSources(HttpMsg *adapted) { adapted->sources |= service().cfg().connectionEncryption ? HttpMsg::srcEcaps : HttpMsg::srcEcap; } + diff --git a/src/adaptation/icap/ModXact.cc b/src/adaptation/icap/ModXact.cc index 875f8e7c36..1140944b2b 100644 --- a/src/adaptation/icap/ModXact.cc +++ b/src/adaptation/icap/ModXact.cc @@ -772,12 +772,12 @@ void Adaptation::Icap::ModXact::startSending() if (state.sending == State::sendingVirgin) echoMore(); else { - // If we are not using the virgin HTTP object update the + // If we are not using the virgin HTTP object update the // HttpMsg::sources flag. // The state.sending may set to State::sendingVirgin in the case // of 206 responses too, where we do not want to update HttpMsg::sources - // flag. However even for 206 responses the state.sending is - // not set yet to sendingVirgin. This is done in later step + // flag. However even for 206 responses the state.sending is + // not set yet to sendingVirgin. This is done in later step // after the parseBody method called. updateSources(); } diff --git a/src/adaptation/icap/ServiceRep.cc b/src/adaptation/icap/ServiceRep.cc index c9fdf35a65..46c1aa7936 100644 --- a/src/adaptation/icap/ServiceRep.cc +++ b/src/adaptation/icap/ServiceRep.cc @@ -89,7 +89,6 @@ Adaptation::Icap::ServiceRep::finalize() writeableCfg().connectionEncryption.configure(true); } else if (!cfg().connectionEncryption.configured()) writeableCfg().connectionEncryption.configure(false); - theSessionFailures.configure(TheConfig.oldest_service_failure > 0 ? TheConfig.oldest_service_failure : -1); diff --git a/src/client_side.cc b/src/client_side.cc index 4b5505e1b7..b9634c8fa1 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2343,7 +2343,7 @@ clientProcessRequest(ConnStateData *conn, const Http1::RequestParserPointer &hp, request->flags.noDirect = (request->flags.accelerated && !request->flags.sslBumped) ? !conn->port->allow_direct : 0; request->sources |= isFtp ? HttpMsg::srcFtp : - ((request->flags.sslBumped || conn->port->transport.protocol == AnyP::PROTO_HTTPS) ? HttpMsg::srcHttps : HttpMsg::srcHttp); + ((request->flags.sslBumped || conn->port->transport.protocol == AnyP::PROTO_HTTPS) ? HttpMsg::srcHttps : HttpMsg::srcHttp); #if USE_AUTH if (request->flags.sslBumped) { if (conn->getAuth() != NULL)