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
pull/1/head
Tatsuhiro Tsujikawa 2009-01-15 15:39:05 +00:00
parent 1ab8ade5d1
commit c34ac25683
5 changed files with 13 additions and 4 deletions

View File

@ -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>
Added --event-poll option to select the method for polling events.

View File

@ -72,6 +72,7 @@ public:
uint64_t sessionDownloadLength;
// milliseconds
int64_t sessionTime;
RESULT result;

View File

@ -93,7 +93,7 @@ bool HttpDownloadCommand::prepareForNextSegment() {
if(!req->isPipeliningEnabled() && req->isPipeliningHint() &&
!_segments.empty() && !downloadFinished) {
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()->
getRange()->getEndByte()+1)) {
return prepareForRetry(0);

View File

@ -55,8 +55,8 @@ ServerStat::ServerStat(const std::string& hostname, const std::string& protocol)
_singleConnectionAvgSpeed(0),
_multiConnectionAvgSpeed(0),
_counter(0),
_status(OK),
_logger(LogFactory::getInstance())
_logger(LogFactory::getInstance()),
_status(OK)
{}
ServerStat::~ServerStat() {}

View File

@ -117,7 +117,7 @@ void RequestGroupTest::testCreateDownloadResult()
CPPUNIT_ASSERT_EQUAL(std::string("http://first/file"), result->uri);
CPPUNIT_ASSERT_EQUAL((size_t)2, result->numUri);
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
// error has been reported
CPPUNIT_ASSERT_EQUAL(DownloadResult::UNKNOWN_ERROR, result->result);