mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 10:05:19 -04:00
corrected bug in file completion
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2301 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5e9e342bc9
commit
5926c79822
2 changed files with 12 additions and 3 deletions
|
@ -351,12 +351,14 @@ uint32_t ChunkMap::getAvailableChunk(uint32_t start_location,const std::string&
|
|||
{
|
||||
uint32_t j = (start_location+i)%(int)_map.size() ; // index of the chunk
|
||||
|
||||
if(_map[j] != FileChunksInfo::CHUNK_DONE)
|
||||
file_is_complete = false ;
|
||||
|
||||
if(_map[j] == FileChunksInfo::CHUNK_OUTSTANDING && (peer_chunks->is_full || peer_chunks->cmap[j]))
|
||||
{
|
||||
#ifdef DEBUG_FTCHUNK
|
||||
std::cerr << "ChunkMap::getAvailableChunk: returning chunk " << j << " for peer " << peer_id << std::endl;
|
||||
#endif
|
||||
file_is_complete = false ;
|
||||
return j ;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue