2010-09-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>

Fixed compile error without BitTorrent support and OpenSSL/GnuTLS.
	* src/DownloadCommand.cc
	* src/DownloadCommand.h
	* src/RequestGroup.cc
pull/1/head
Tatsuhiro Tsujikawa 2010-09-11 15:54:53 +00:00
parent 58ec84b1e7
commit 70ebb788b2
4 changed files with 16 additions and 8 deletions

View File

@ -1,3 +1,10 @@
2010-09-12 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error without BitTorrent support and OpenSSL/GnuTLS.
* src/DownloadCommand.cc
* src/DownloadCommand.h
* src/RequestGroup.cc
2010-09-11 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Added missing MockSegment.h to test/Makefile.am

View File

@ -81,10 +81,8 @@ DownloadCommand::DownloadCommand(cuid_t cuid,
AbstractCommand(cuid, req, fileEntry, requestGroup, e, s),
buf_(new unsigned char[BUFSIZE]),
startupIdleTime_(10),
lowestDownloadSpeedLimit_(0)
#ifdef ENABLE_MESSAGE_DIGEST
, pieceHashValidationEnabled_(false)
#endif // ENABLE_MESSAGE_DIGEST
lowestDownloadSpeedLimit_(0),
pieceHashValidationEnabled_(false)
{
#ifdef ENABLE_MESSAGE_DIGEST
{

View File

@ -53,10 +53,10 @@ private:
unsigned int lowestDownloadSpeedLimit_;
SharedHandle<PeerStat> peerStat_;
#ifdef ENABLE_MESSAGE_DIGEST
bool pieceHashValidationEnabled_;
#ifdef ENABLE_MESSAGE_DIGEST
SharedHandle<MessageDigestContext> messageDigestContext_;
#endif // ENABLE_MESSAGE_DIGEST

View File

@ -542,8 +542,11 @@ void RequestGroup::initPieceStorage()
{
SharedHandle<PieceStorage> tempPieceStorage;
if(downloadContext_->knowsTotalLength() &&
(downloadContext_->getTotalLength() > 0 ||
downloadContext_->hasAttribute(bittorrent::BITTORRENT))) {
(downloadContext_->getTotalLength() > 0
#ifdef ENABLE_BITTORRENT
|| downloadContext_->hasAttribute(bittorrent::BITTORRENT)
#endif // ENABLE_BITTORRENT
)) {
#ifdef ENABLE_BITTORRENT
SharedHandle<DefaultPieceStorage> ps
(new DefaultPieceStorage(downloadContext_, option_.get()));