mirror of https://github.com/aria2/aria2
2008-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Moved `TransferStat stat = ...' to inside the `if' clause. * src/RequestGroup.cc (RequestGroup::reportDownloadFinished)pull/1/head
parent
67767e2f61
commit
f6aaa094a8
|
@ -1,3 +1,8 @@
|
||||||
|
2008-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
|
Moved `TransferStat stat = ...' to inside the `if' clause.
|
||||||
|
* src/RequestGroup.cc (RequestGroup::reportDownloadFinished)
|
||||||
|
|
||||||
2008-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
2008-09-19 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
|
||||||
|
|
||||||
Fixed the bug that a block in a piece is requested when same block is
|
Fixed the bug that a block in a piece is requested when same block is
|
||||||
|
|
|
@ -972,9 +972,9 @@ void RequestGroup::reportDownloadFinished()
|
||||||
_logger->notice(MSG_FILE_DOWNLOAD_COMPLETED,
|
_logger->notice(MSG_FILE_DOWNLOAD_COMPLETED,
|
||||||
getFilePath().c_str());
|
getFilePath().c_str());
|
||||||
#ifdef ENABLE_BITTORRENT
|
#ifdef ENABLE_BITTORRENT
|
||||||
TransferStat stat = calculateStat();
|
|
||||||
SharedHandle<BtContext> ctx = dynamic_pointer_cast<BtContext>(_downloadContext);
|
SharedHandle<BtContext> ctx = dynamic_pointer_cast<BtContext>(_downloadContext);
|
||||||
if(!ctx.isNull()) {
|
if(!ctx.isNull()) {
|
||||||
|
TransferStat stat = calculateStat();
|
||||||
double shareRatio = ((stat.getAllTimeUploadLength()*10)/getCompletedLength())/10.0;
|
double shareRatio = ((stat.getAllTimeUploadLength()*10)/getCompletedLength())/10.0;
|
||||||
_logger->notice(MSG_SHARE_RATIO_REPORT,
|
_logger->notice(MSG_SHARE_RATIO_REPORT,
|
||||||
shareRatio,
|
shareRatio,
|
||||||
|
|
Loading…
Reference in New Issue