]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Applying sourceformating
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Thu, 3 Feb 2011 08:02:28 +0000 (10:02 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Thu, 3 Feb 2011 08:02:28 +0000 (10:02 +0200)
15 files changed:
src/ipc/Forwarder.cc
src/ipc/Inquirer.cc
src/ipc/Request.h
src/ipc/Response.h
src/mgr/Request.cc
src/mgr/Response.cc
src/snmp/Pdu.cc
src/snmp/Pdu.h
src/snmp/Request.cc
src/snmp/Request.h
src/snmp/Response.cc
src/snmp/Response.h
src/snmp/Var.cc
src/snmp/Var.h
src/snmp_core.cc

index f60515a8050db7fd50cb1d0c455bfb8867440224..3650229a2d83da85910e24b56982c9d1eceef1b5 100644 (file)
@@ -19,8 +19,8 @@ Ipc::Forwarder::RequestsMap Ipc::Forwarder::TheRequestsMap;
 unsigned int Ipc::Forwarder::LastRequestId = 0;
 
 Ipc::Forwarder::Forwarder(Request::Pointer aRequest, double aTimeout):
-    AsyncJob("Ipc::Forwarder"),
-    request(aRequest), timeout(aTimeout)
+        AsyncJob("Ipc::Forwarder"),
+        request(aRequest), timeout(aTimeout)
 {
     debugs(54, 5, HERE);
 }
index 9c6e123d896e43f50276a87caaa7481fe6b83f91..d80dce5e3ad0adc40ac2bd2b2f436482534f6825 100644 (file)
@@ -29,8 +29,8 @@ LesserStrandByKidId(const Ipc::StrandCoord &c1, const Ipc::StrandCoord &c2)
 
 Ipc::Inquirer::Inquirer(Request::Pointer aRequest, const StrandCoords& coords,
                         double aTimeout):
-    AsyncJob("Ipc::Inquirer"),
-    request(aRequest), strands(coords), pos(strands.begin()), timeout(aTimeout)
+        AsyncJob("Ipc::Inquirer"),
+        request(aRequest), strands(coords), pos(strands.begin()), timeout(aTimeout)
 {
     debugs(54, 5, HERE);
 
index 1711ff2164b932fb546aa8b077b5adb84a606d88..f56aad3fbf5828060440d1fb59b62b63f3113e48 100644 (file)
@@ -23,7 +23,7 @@ public:
 
 public:
     Request(int aRequestorId, unsigned int aRequestId):
-        requestorId(aRequestorId), requestId(aRequestId) {}
+            requestorId(aRequestorId), requestId(aRequestId) {}
 
     virtual void pack(TypedMsgHdr& msg) const = 0; ///< prepare for sendmsg()
     virtual Pointer clone() const = 0; ///< returns a copy of this
index edbf2a971e91e583b82f17454be9a5ab3df19f63..1ae2f8a7bfb507af06cb0af7fc8b571a2f08b2cc 100644 (file)
@@ -23,7 +23,7 @@ public:
 
 public:
     explicit Response(unsigned int aRequestId):
-        requestId(aRequestId) {}
+            requestId(aRequestId) {}
 
     virtual void pack(TypedMsgHdr& msg) const = 0; ///< prepare for sendmsg()
     virtual Pointer clone() const = 0; ///< returns a copy of this
index 15d8bd066e88f162882156304ae68dc4ea94cbbe..9e6f76e83477be681347735d9a1935e79d91b9ca 100644 (file)
@@ -22,13 +22,13 @@ Mgr::Request::Request(int aRequestorId, unsigned int aRequestId, int aFd,
 }
 
 Mgr::Request::Request(const Request& request):
-    Ipc::Request(request.requestorId, request.requestId),
-    fd(request.fd), params(request.params)
+        Ipc::Request(request.requestorId, request.requestId),
+        fd(request.fd), params(request.params)
 {
 }
 
 Mgr::Request::Request(const Ipc::TypedMsgHdr& msg):
-    Ipc::Request(0, 0)
+        Ipc::Request(0, 0)
 {
     msg.checkType(Ipc::mtCacheMgrRequest);
     msg.getPod(requestorId);
index e7a5866705beafc0d67f3a5ce4ee802dca867779..38d48865b1783425b2023958ea047010618e41b1 100644 (file)
@@ -22,12 +22,12 @@ Mgr::Response::Response(unsigned int aRequestId, Action::Pointer anAction):
 }
 
 Mgr::Response::Response(const Response& response):
-    Ipc::Response(response.requestId), action(response.action)
+        Ipc::Response(response.requestId), action(response.action)
 {
 }
 
 Mgr::Response::Response(const Ipc::TypedMsgHdr& msg):
-    Ipc::Response(0)
+        Ipc::Response(0)
 {
     msg.checkType(Ipc::mtCacheMgrResponse);
     msg.getPod(requestId);
index 122856b019af24e48743614752a49e64271d5859..db1af89d284f7991f39858f4f8ee54234a22f356 100644 (file)
@@ -52,8 +52,7 @@ Snmp::Pdu::aggregate(const Pdu& pdu)
     Must(varCount() == pdu.varCount());
     aggrCount++;
     for (variable_list* p_aggr = variables, *p_var = pdu.variables; p_var != NULL;
-         p_aggr = p_aggr->next_variable, p_var = p_var->next_variable)
-    {
+            p_aggr = p_aggr->next_variable, p_var = p_var->next_variable) {
         Must(p_aggr != NULL);
         Var& aggr = static_cast<Var&>(*p_aggr);
         Var& var = static_cast<Var&>(*p_var);
@@ -61,8 +60,7 @@ Snmp::Pdu::aggregate(const Pdu& pdu)
             aggr.setName(var.getName());
             aggr.copyValue(var);
         } else {
-            switch(snmpAggrType(aggr.name, aggr.name_length))
-            {
+            switch (snmpAggrType(aggr.name, aggr.name_length)) {
             case atSum:
             case atAverage:
                 // The mean-average division is done later
@@ -128,8 +126,7 @@ Snmp::Pdu::setVars(variable_list* vars)
 {
     clearVars();
     for (variable_list** p_var = &variables; vars != NULL;
-         vars = vars->next_variable, p_var = &(*p_var)->next_variable)
-    {
+            vars = vars->next_variable, p_var = &(*p_var)->next_variable) {
         *p_var = new Var(static_cast<Var&>(*vars));
     }
 }
@@ -207,8 +204,7 @@ Snmp::Pdu::unpack(const Ipc::TypedMsgHdr& msg)
     msg.getPod(time);
     int count = msg.getInt();
     for (variable_list** p_var = &variables; count > 0;
-         p_var = &(*p_var)->next_variable, --count)
-    {
+            p_var = &(*p_var)->next_variable, --count) {
         Var* var = new Var();
         var->unpack(msg);
         *p_var = var;
@@ -224,14 +220,14 @@ Snmp::Pdu::varCount() const
     return count;
 }
 
-void 
+void
 Snmp::Pdu::fixAggregate()
 {
     if (aggrCount < 2)
         return;
     for (variable_list* p_aggr = variables; p_aggr != NULL; p_aggr = p_aggr->next_variable) {
         Var& aggr = static_cast<Var&>(*p_aggr);
-        if(snmpAggrType(aggr.name, aggr.name_length) == atAverage) {
+        if (snmpAggrType(aggr.name, aggr.name_length) == atAverage) {
             aggr /= aggrCount;
         }
     }
index aad0e00b934f449eb0fef35e49f2f5409a337f43..2069539ae9f68d9b0855eb8cc41f5b4aae34882d 100644 (file)
@@ -37,7 +37,7 @@ public:
     void clearVars(); ///< clear variables list
     Range<const oid*> getSystemOid() const;
     void setSystemOid(const Range<const oid*>& systemOid);
-    void clearSystemOid(); 
+    void clearSystemOid();
 
 private:
     void init(); ///< initialize members
index fabdb13ec038b46819fb191c1788461ca4ae6c32..b204f8c2e90f1a09ca45a62287b78becfed214e7 100644 (file)
 Snmp::Request::Request(int aRequestorId, unsigned int aRequestId,
                        const Pdu& aPdu, const Session& aSession,
                        int aFd, const Ip::Address& anAddress):
-    Ipc::Request(aRequestorId, aRequestId),
-    pdu(aPdu), session(aSession), fd(aFd), address(anAddress)
+        Ipc::Request(aRequestorId, aRequestId),
+        pdu(aPdu), session(aSession), fd(aFd), address(anAddress)
 {
 }
 
 Snmp::Request::Request(const Request& request):
-    Ipc::Request(request.requestorId, request.requestId),
-    pdu(request.pdu), session(request.session),
-    fd(request.fd), address(request.address)
+        Ipc::Request(request.requestorId, request.requestId),
+        pdu(request.pdu), session(request.session),
+        fd(request.fd), address(request.address)
 {
 }
 
 Snmp::Request::Request(const Ipc::TypedMsgHdr& msg):
-    Ipc::Request(0, 0)
+        Ipc::Request(0, 0)
 {
     msg.checkType(Ipc::mtSnmpRequest);
     msg.getPod(requestorId);
index f11cfa7723efc487c1c1c422414175cd5742d355..f515b0b2aba7aff912c3dfd8513b08b878d09a8d 100644 (file)
@@ -23,7 +23,7 @@ class Request: public Ipc::Request
 {
 public:
     Request(int aRequestorId, unsigned int aRequestId, const Pdu& aPdu,
-        const Session& aSession, int aFd, const Ip::Address& anAddress);
+            const Session& aSession, int aFd, const Ip::Address& anAddress);
 
     explicit Request(const Ipc::TypedMsgHdr& msg); ///< from recvmsg()
     /* Ipc::Request API */
@@ -35,7 +35,7 @@ private:
 
 public:
     Pdu pdu; ///< SNMP protocol data unit
-    Session session; ///< SNMP session 
+    Session session; ///< SNMP session
     int fd; ///< client connection descriptor
     Ip::Address address; ///< client address
 };
index aca96469933736bb45ad5aa541cc6dc2ac9eabb1..0128f16a87fcf6dd53073b3c432181b6abe53be9 100644 (file)
@@ -19,17 +19,17 @@ std::ostream& Snmp::operator << (std::ostream& os, const Response& response)
 }
 
 Snmp::Response::Response(unsigned int aRequestId):
-    Ipc::Response(aRequestId), pdu()
+        Ipc::Response(aRequestId), pdu()
 {
 }
 
 Snmp::Response::Response(const Response& response):
-    Ipc::Response(response.requestId), pdu(response.pdu)
+        Ipc::Response(response.requestId), pdu(response.pdu)
 {
 }
 
 Snmp::Response::Response(const Ipc::TypedMsgHdr& msg):
-    Ipc::Response(0)
+        Ipc::Response(0)
 {
     msg.checkType(Ipc::mtSnmpResponse);
     msg.getPod(requestId);
index 2f7e4b086d82ec32c79a19dd8e56059edd6edc7c..b2bf360298f1d7e821bcb04f5f0a0fbd69cb0bb4 100644 (file)
@@ -16,7 +16,7 @@
 namespace Snmp
 {
 
-/// 
+///
 class Response: public Ipc::Response
 {
 public:
index 70155e04788b50149f6201748eec6e08de52bb74..3a6a6b982f5a198f8c1c27a99bcb80bfe74d8304 100644 (file)
@@ -45,8 +45,7 @@ Snmp::Var::init()
 Snmp::Var&
 Snmp::Var::operator += (const Var& var)
 {
-    switch(type)
-    {
+    switch (type) {
     case SMI_INTEGER:
         setInt(asInt() + var.asInt());
         break;
@@ -74,8 +73,7 @@ Snmp::Var&
 Snmp::Var::operator /= (int num)
 {
     Must(num != 0);
-    switch(type)
-    {
+    switch (type) {
     case SMI_INTEGER:
         setInt(asInt() / num);
         break;
@@ -102,8 +100,7 @@ Snmp::Var::operator /= (int num)
 bool
 Snmp::Var::operator < (const Var& var) const
 {
-    switch(type)
-    {
+    switch (type) {
     case SMI_INTEGER:
         return asInt() < var.asInt();
     case SMI_GAUGE32:
@@ -125,8 +122,7 @@ Snmp::Var::operator < (const Var& var) const
 bool
 Snmp::Var::operator > (const Var& var) const
 {
-    switch(type)
-    {
+    switch (type) {
     case SMI_INTEGER:
         return asInt() > var.asInt();
     case SMI_GAUGE32:
index 7d50e89788f1089a1b9225c8fe63913e18b59d58..bd0adb23677c00e7a244dfb381bc5ac575206cd7 100644 (file)
@@ -31,7 +31,7 @@ public:
     Var& operator /= (int num);
     bool operator < (const Var& var) const;
     bool operator > (const Var& var) const;
-    
+
     void pack(Ipc::TypedMsgHdr& msg) const; ///< prepare for sendmsg()
     void unpack(const Ipc::TypedMsgHdr& msg); ///< restore struct from the message
 
index 0890ab4769337adc320e6f77d60f9219e2deecc2..fb300d2ed23deca2dea069529cb6123506dbac55 100644 (file)
@@ -162,11 +162,11 @@ snmpInit(void)
     snmpAddNodeStr("1.3.6.1.4.1.3495.1.3.1", PERF_SYS_NUMOBJCNT, snmp_prfSysFn, static_Inst, atSum);
     /*
       Amos comments:
-      The meaning of LRU is "oldest timestamped object in cache,  if LRU algorithm is 
+      The meaning of LRU is "oldest timestamped object in cache,  if LRU algorithm is
       used"...
-      What this SMP support needs to do is aggregate via a special filter equivalent to 
-      min() to retain the semantic oldest-object meaning. A special one is needed that 
-      works as unsigned and ignores '0' values. 
+      What this SMP support needs to do is aggregate via a special filter equivalent to
+      min() to retain the semantic oldest-object meaning. A special one is needed that
+      works as unsigned and ignores '0' values.
      */
     snmpAddNodeStr("1.3.6.1.4.1.3495.1.3.1", PERF_SYS_CURLRUEXP, snmp_prfSysFn, static_Inst);
     snmpAddNodeStr("1.3.6.1.4.1.3495.1.3.1", PERF_SYS_CURUNLREQ, snmp_prfSysFn, static_Inst, atSum);
@@ -532,7 +532,7 @@ snmpConstructReponse(snmp_request_t * rq)
 
     if (UsingSmp() && IamWorkerProcess()) {
         AsyncJob::Start(new Snmp::Forwarder(static_cast<Snmp::Pdu&>(*rq->PDU),
-            static_cast<Snmp::Session&>(rq->session), rq->sock, rq->from));
+                                            static_cast<Snmp::Session&>(rq->session), rq->sock, rq->from));
         snmp_free_pdu(rq->PDU);
         return;
     }