2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed the bug that downloading > 4GB file fails on 32bit systems.
	* src/HttpRequest.cc
	* src/HttpRequestCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-10-31 04:36:38 +00:00
parent 236e64cb25
commit 6e88cae02b
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2010-10-31 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed the bug that downloading > 4GB file fails on 32bit systems.
* src/HttpRequest.cc
* src/HttpRequestCommand.cc
2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net> 2010-10-30 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Use unnamed namespace instead of static keyword. Use unnamed namespace instead of static keyword.

View File

@ -59,7 +59,7 @@ HttpRequest::HttpRequest():contentEncodingEnabled_(true),
userAgent_(USER_AGENT), userAgent_(USER_AGENT),
noCache_(true), noCache_(true),
acceptGzip_(false), acceptGzip_(false),
endOffsetOverride_(false) endOffsetOverride_(0)
{} {}
void HttpRequest::setSegment(const SharedHandle<Segment>& segment) void HttpRequest::setSegment(const SharedHandle<Segment>& segment)

View File

@ -188,7 +188,8 @@ bool HttpRequestCommand::executeInternal() {
getPieceStorage()->getNextUsedIndex(segment->getIndex()); getPieceStorage()->getNextUsedIndex(segment->getIndex());
endOffset = std::min endOffset = std::min
(static_cast<off_t>(getFileEntry()->getLength()), (static_cast<off_t>(getFileEntry()->getLength()),
getFileEntry()->gtoloff(segment->getSegmentLength()*nextIndex)); getFileEntry()->gtoloff
(static_cast<off_t>(segment->getSegmentLength())*nextIndex));
} }
SharedHandle<HttpRequest> httpRequest SharedHandle<HttpRequest> httpRequest
(createHttpRequest(getRequest(), (createHttpRequest(getRequest(),