summaryrefslogtreecommitdiff
path: root/src/PeerInteractionCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-07-16 00:58:41 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2011-07-16 00:58:41 +0900
commit5c4a52ad741c66b4aa263a542da2c1e5546ca6bf (patch)
treec51b9e30d864d321ac6747d6d5dca9d92c662076 /src/PeerInteractionCommand.cc
parentba710a7cb4c2a1e6b75ba2a7df2ec03f44a260ab (diff)
Managed user cuid in Piece.
Previous implementation does not store information which Command cuid uses which Piece. Mark Piece acquired by SegmentMan by setting Piece::setUsedBySegment(true).
Diffstat (limited to 'src/PeerInteractionCommand.cc')
-rw-r--r--src/PeerInteractionCommand.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/PeerInteractionCommand.cc b/src/PeerInteractionCommand.cc
index 488456ac..0d7a3059 100644
--- a/src/PeerInteractionCommand.cc
+++ b/src/PeerInteractionCommand.cc
@@ -194,6 +194,7 @@ PeerInteractionCommand::PeerInteractionCommand
reqFactory->setPieceStorage(pieceStorage);
reqFactory->setBtMessageDispatcher(dispatcher.get());
reqFactory->setBtMessageFactory(factory.get());
+ reqFactory->setCuid(cuid);
DefaultBtInteractiveHandle btInteractive
(new DefaultBtInteractive(requestGroup_->getDownloadContext(), getPeer()));
@@ -248,6 +249,7 @@ PeerInteractionCommand::PeerInteractionCommand
extensionMessageFactory->setBtMessageFactory(factory.get());
if(metadataGetMode) {
+ utMetadataRequestFactory->setCuid(cuid);
utMetadataRequestFactory->setDownloadContext
(requestGroup_->getDownloadContext());
utMetadataRequestFactory->setBtMessageDispatcher(dispatcher.get());