diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-09-19 13:57:18 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-09-19 13:57:18 +0000 |
| commit | cdaafd8c8c17881db1e0abcbca6ecd8be18a1619 (patch) | |
| tree | bfb75ce40f0bd84dbf506f85156174d9a0a64239 /src/PeerSessionResource.cc | |
| parent | c1ba5c974529cbafda79a85611778e00ae49250e (diff) | |
2008-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Removed _uploadLength and _downloadLength from
PeerSessionResource
and use PeerStat::_sessionUploadLength and
PeerStat::_sessionDownloadLength.
* src/PeerSessionResource.cc
* src/PeerSessionResource.h
Diffstat (limited to 'src/PeerSessionResource.cc')
| -rw-r--r-- | src/PeerSessionResource.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/PeerSessionResource.cc b/src/PeerSessionResource.cc index 71c0dcd3..c6436a3c 100644 --- a/src/PeerSessionResource.cc +++ b/src/PeerSessionResource.cc @@ -53,8 +53,6 @@ PeerSessionResource::PeerSessionResource(size_t pieceLength, uint64_t totalLengt _extendedMessagingEnabled(false), _dhtEnabled(false), _latency(DEFAULT_LATENCY), - _uploadLength(0), - _downloadLength(0), _lastDownloadUpdate(0), _lastAmUnchoking(0) {} @@ -305,24 +303,22 @@ void PeerSessionResource::updateLatency(unsigned int latency) uint64_t PeerSessionResource::uploadLength() const { - return _uploadLength; + return _peerStat.getSessionUploadLength(); } void PeerSessionResource::updateUploadLength(size_t bytes) { _peerStat.updateUploadLength(bytes); - _uploadLength += bytes; } uint64_t PeerSessionResource::downloadLength() const { - return _downloadLength; + return _peerStat.getSessionDownloadLength(); } void PeerSessionResource::updateDownloadLength(size_t bytes) { _peerStat.updateDownloadLength(bytes); - _downloadLength += bytes; _lastDownloadUpdate.reset(); } |
