소스 검색

Fix compile error with --disable-bittorrent

Tatsuhiro Tsujikawa 9 년 전
부모
커밋
8d30869966
1개의 변경된 파일6개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 1
      src/RequestGroup.cc

+ 6 - 1
src/RequestGroup.cc

@@ -1264,10 +1264,15 @@ void RequestGroup::enableSeedOnly()
   }
 }
 
-bool RequestGroup::isSeeder() const {
+bool RequestGroup::isSeeder() const
+{
+#ifdef ENABLE_BITTORRENT
   return downloadContext_->hasAttribute(CTX_ATTR_BT) &&
          !bittorrent::getTorrentAttrs(downloadContext_)->metadata.empty() &&
          downloadFinished();
+#else  // !ENABLE_BITTORRENT
+  return false;
+#endif // !ENABLE_BITTORRENT
 }
 
 } // namespace aria2