mirror of https://github.com/aria2/aria2
2009-01-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile warning/error. * src/DownloadResult.h * src/HttpDownloadCommand.cc * src/ServerStat.cc * test/RequestGroupTest.ccpull/1/head
parent
1ab8ade5d1
commit
c34ac25683
|
@ -1,3 +1,11 @@
|
||||||
|
2009-01-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
|
Fixed compile warning/error.
|
||||||
|
* src/DownloadResult.h
|
||||||
|
* src/HttpDownloadCommand.cc
|
||||||
|
* src/ServerStat.cc
|
||||||
|
* test/RequestGroupTest.cc
|
||||||
|
|
||||||
2009-01-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
2009-01-16 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
|
||||||
|
|
||||||
Added --event-poll option to select the method for polling events.
|
Added --event-poll option to select the method for polling events.
|
||||||
|
|
|
@ -72,6 +72,7 @@ public:
|
||||||
|
|
||||||
uint64_t sessionDownloadLength;
|
uint64_t sessionDownloadLength;
|
||||||
|
|
||||||
|
// milliseconds
|
||||||
int64_t sessionTime;
|
int64_t sessionTime;
|
||||||
|
|
||||||
RESULT result;
|
RESULT result;
|
||||||
|
|
|
@ -93,7 +93,7 @@ bool HttpDownloadCommand::prepareForNextSegment() {
|
||||||
if(!req->isPipeliningEnabled() && req->isPipeliningHint() &&
|
if(!req->isPipeliningEnabled() && req->isPipeliningHint() &&
|
||||||
!_segments.empty() && !downloadFinished) {
|
!_segments.empty() && !downloadFinished) {
|
||||||
const SharedHandle<Segment>& segment = _segments.front();
|
const SharedHandle<Segment>& segment = _segments.front();
|
||||||
if(segment->getPosition()+segment->getLength() ==
|
if(static_cast<uint64_t>(segment->getPosition())+segment->getLength() ==
|
||||||
static_cast<uint64_t>(_httpResponse->getHttpHeader()->
|
static_cast<uint64_t>(_httpResponse->getHttpHeader()->
|
||||||
getRange()->getEndByte()+1)) {
|
getRange()->getEndByte()+1)) {
|
||||||
return prepareForRetry(0);
|
return prepareForRetry(0);
|
||||||
|
|
|
@ -55,8 +55,8 @@ ServerStat::ServerStat(const std::string& hostname, const std::string& protocol)
|
||||||
_singleConnectionAvgSpeed(0),
|
_singleConnectionAvgSpeed(0),
|
||||||
_multiConnectionAvgSpeed(0),
|
_multiConnectionAvgSpeed(0),
|
||||||
_counter(0),
|
_counter(0),
|
||||||
_status(OK),
|
_logger(LogFactory::getInstance()),
|
||||||
_logger(LogFactory::getInstance())
|
_status(OK)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
ServerStat::~ServerStat() {}
|
ServerStat::~ServerStat() {}
|
||||||
|
|
|
@ -117,7 +117,7 @@ void RequestGroupTest::testCreateDownloadResult()
|
||||||
CPPUNIT_ASSERT_EQUAL(std::string("http://first/file"), result->uri);
|
CPPUNIT_ASSERT_EQUAL(std::string("http://first/file"), result->uri);
|
||||||
CPPUNIT_ASSERT_EQUAL((size_t)2, result->numUri);
|
CPPUNIT_ASSERT_EQUAL((size_t)2, result->numUri);
|
||||||
CPPUNIT_ASSERT_EQUAL((uint64_t)0, result->sessionDownloadLength);
|
CPPUNIT_ASSERT_EQUAL((uint64_t)0, result->sessionDownloadLength);
|
||||||
CPPUNIT_ASSERT_EQUAL((time_t)0, result->sessionTime);
|
CPPUNIT_ASSERT_EQUAL((int64_t)0, result->sessionTime);
|
||||||
// result is UNKNOWN_ERROR if download has not completed and no specific
|
// result is UNKNOWN_ERROR if download has not completed and no specific
|
||||||
// error has been reported
|
// error has been reported
|
||||||
CPPUNIT_ASSERT_EQUAL(DownloadResult::UNKNOWN_ERROR, result->result);
|
CPPUNIT_ASSERT_EQUAL(DownloadResult::UNKNOWN_ERROR, result->result);
|
||||||
|
|
Loading…
Reference in New Issue