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).
This commit is contained in:
Tatsuhiro Tsujikawa 2011-07-16 00:58:41 +09:00
parent ba710a7cb4
commit 5c4a52ad74
18 changed files with 313 additions and 153 deletions

View file

@ -30,7 +30,8 @@ public:
virtual SharedHandle<Piece> getMissingPiece
(const SharedHandle<Peer>& peer,
const std::vector<size_t>& exlucdedIndexes)
const std::vector<size_t>& exlucdedIndexes,
cuid_t cuid)
{
if(missingIndexes.empty()) {
return SharedHandle<Piece>();