]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/mgr/IoAction.cc
SourceFormat Enforcement
[thirdparty/squid.git] / src / mgr / IoAction.cc
index a6fc39ddb720903ce68a5d14a63b9b5cc63eebc1..df028a9725a91f3790cd887d6e4ad3e3a518f96e 100644 (file)
@@ -1,38 +1,42 @@
 /*
- * $Id$
- *
- * DEBUG: section 16    Cache Manager API
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
  *
+ * Squid software is distributed under GPLv2+ license and includes
+ * contributions from numerous individuals and organizations.
+ * Please see the COPYING and CONTRIBUTORS files for details.
  */
 
+/* DEBUG: section 16    Cache Manager API */
+
 #include "squid.h"
 #include "base/TextException.h"
+#include "IoStats.h"
 #include "ipc/Messages.h"
 #include "ipc/TypedMsgHdr.h"
 #include "mgr/IoAction.h"
 #include "SquidMath.h"
 #include "Store.h"
+#include "tools.h"
 
-
-extern void GetIoStats(Mgr::IoActionData& stats);
-extern void DumpIoStats(Mgr::IoActionData& stats, StoreEntry* sentry);
+void GetIoStats(Mgr::IoActionData& stats);
+void DumpIoStats(Mgr::IoActionData& stats, StoreEntry* sentry);
 
 Mgr::IoActionData::IoActionData()
 {
-    xmemset(this, 0, sizeof(*this));
+    memset(this, 0, sizeof(*this));
 }
 
 Mgr::IoActionData&
 Mgr::IoActionData::operator += (const IoActionData& stats)
 {
     http_reads += stats.http_reads;
-    for (int i = 0; i < _iostats::histSize; ++i)
+    for (int i = 0; i < IoStats::histSize; ++i)
         http_read_hist[i] += stats.http_read_hist[i];
     ftp_reads += stats.ftp_reads;
-    for (int i = 0; i < _iostats::histSize; ++i)
+    for (int i = 0; i < IoStats::histSize; ++i)
         ftp_read_hist[i] += stats.ftp_read_hist[i];
     gopher_reads += stats.gopher_reads;
-    for (int i = 0; i < _iostats::histSize; ++i)
+    for (int i = 0; i < IoStats::histSize; ++i)
         gopher_read_hist[i] += stats.gopher_read_hist[i];
 
     return *this;
@@ -44,8 +48,8 @@ Mgr::IoAction::Create(const CommandPointer &cmd)
     return new IoAction(cmd);
 }
 
-Mgr::IoAction::IoAction(const CommandPointer &cmd):
-        Action(cmd), data()
+Mgr::IoAction::IoAction(const CommandPointer &aCmd):
+    Action(aCmd), data()
 {
     debugs(16, 5, HERE);
 }
@@ -84,3 +88,4 @@ Mgr::IoAction::unpack(const Ipc::TypedMsgHdr& msg)
     msg.checkType(Ipc::mtCacheMgrResponse);
     msg.getPod(data);
 }
+