mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 02:55:18 -04:00
corrected compled completion and file progress issues
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2356 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
2b58d2fc02
commit
851e9069f6
5 changed files with 43 additions and 22 deletions
|
@ -320,7 +320,7 @@ void ftFileCreator::setChunkStrategy(FileChunksInfo::ChunkStrategy s)
|
|||
* But can return size = 0, if we are still waiting for the data.
|
||||
*/
|
||||
|
||||
bool ftFileCreator::getMissingChunk(const std::string& peer_id,uint32_t size_hint,uint64_t &offset, uint32_t& size,bool& source_chunk_map_needed,bool& file_is_complete)
|
||||
bool ftFileCreator::getMissingChunk(const std::string& peer_id,uint32_t size_hint,uint64_t &offset, uint32_t& size,bool& source_chunk_map_needed)
|
||||
{
|
||||
RsStackMutex stack(ftcMutex); /********** STACK LOCKED MTX ******/
|
||||
#ifdef FILE_DEBUG
|
||||
|
@ -359,7 +359,7 @@ bool ftFileCreator::getMissingChunk(const std::string& peer_id,uint32_t size_hin
|
|||
|
||||
ftChunk chunk ;
|
||||
|
||||
if(!chunkMap.getDataChunk(peer_id,size_hint,chunk,source_chunk_map_needed,file_is_complete))
|
||||
if(!chunkMap.getDataChunk(peer_id,size_hint,chunk,source_chunk_map_needed))
|
||||
return false ;
|
||||
|
||||
#ifdef FILE_DEBUG
|
||||
|
@ -429,4 +429,10 @@ void ftFileCreator::setSourceMap(const std::string& peer_id,const CompressedChun
|
|||
chunkMap.setPeerAvailabilityMap(peer_id,compressed_map) ;
|
||||
}
|
||||
|
||||
bool ftFileCreator::finished()
|
||||
{
|
||||
RsStackMutex stack(ftcMutex); /********** STACK LOCKED MTX ******/
|
||||
|
||||
return chunkMap.isComplete() ;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue