summaryrefslogtreecommitdiff
path: root/src/ServerStat.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-05 16:01:46 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2010-01-05 16:01:46 +0000
commit4db349c1f32b4a313d12d114137432441633d00a (patch)
tree417451971e264834312cfd8339c79930d680a5d1 /src/ServerStat.cc
parent338e8aca09331d3e7fa4e1e8e1f9d10260986772 (diff)
2010-01-06 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Untabify. Fixed one line in copyright which is longer than 80 columns. * src * test
Diffstat (limited to 'src/ServerStat.cc')
-rw-r--r--src/ServerStat.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/ServerStat.cc b/src/ServerStat.cc
index 3b522a5e..1e2a36a1 100644
--- a/src/ServerStat.cc
+++ b/src/ServerStat.cc
@@ -16,7 +16,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* In addition, as a special exception, the copyright holders give
* permission to link the code of portions of this program with the
@@ -102,15 +102,15 @@ void ServerStat::updateSingleConnectionAvgSpeed(unsigned int downloadSpeed)
}
if(avgDownloadSpeed < (int)(0.80*_singleConnectionAvgSpeed)) {
_logger->debug("ServerStat:%s: resetting counter since single connection"
- " speed dropped", getHostname().c_str());
+ " speed dropped", getHostname().c_str());
_counter = 0;
}
_logger->debug("ServerStat:%s: _singleConnectionAvgSpeed old:%.2fKB/s"
- " new:%.2fKB/s last:%.2fKB/s",
- getHostname().c_str(),
- (float) _singleConnectionAvgSpeed/1024,
- (float) avgDownloadSpeed/1024,
- (float) downloadSpeed / 1024);
+ " new:%.2fKB/s last:%.2fKB/s",
+ getHostname().c_str(),
+ (float) _singleConnectionAvgSpeed/1024,
+ (float) avgDownloadSpeed/1024,
+ (float) downloadSpeed / 1024);
_singleConnectionAvgSpeed = (int)avgDownloadSpeed;
}
@@ -135,11 +135,11 @@ void ServerStat::updateMultiConnectionAvgSpeed(unsigned int downloadSpeed)
((1.0/5.0)*(float)downloadSpeed);
}
_logger->debug("ServerStat:%s: _multiConnectionAvgSpeed old:%.2fKB/s"
- " new:%.2fKB/s last:%.2fKB/s",
- getHostname().c_str(),
- (float) _multiConnectionAvgSpeed/1024,
- (float) avgDownloadSpeed/1024,
- (float) downloadSpeed / 1024);
+ " new:%.2fKB/s last:%.2fKB/s",
+ getHostname().c_str(),
+ (float) _multiConnectionAvgSpeed/1024,
+ (float) avgDownloadSpeed/1024,
+ (float) downloadSpeed / 1024);
_multiConnectionAvgSpeed = (int)avgDownloadSpeed;
}
@@ -162,19 +162,19 @@ void ServerStat::setStatus(const std::string& status)
{
size_t len = arrayLength(STATUS_STRING);
const std::string* p = std::find(&STATUS_STRING[0],
- &STATUS_STRING[len],
- status);
+ &STATUS_STRING[len],
+ status);
if(p != &STATUS_STRING[len]) {
_status = static_cast<STATUS>(ServerStat::OK+
- std::distance(&STATUS_STRING[0], p));
+ std::distance(&STATUS_STRING[0], p));
}
}
void ServerStat::setStatusInternal(STATUS status)
{
_logger->debug("ServerStat: set status %s for %s (%s)",
- STATUS_STRING[status].c_str(),
- _hostname.c_str(), _protocol.c_str());
+ STATUS_STRING[status].c_str(),
+ _hostname.c_str(), _protocol.c_str());
_status = status;
_lastUpdated.reset();
}