mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 01:55:19 -04:00
Improvements to file transfer:
- corrected 2 potential flaws of swarming causing request of unavailable data (This should normally be taken care of on the server side!) - improved swarming test code with fault simulation - only ask CRC32 maps to peers that have a complete file. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4947 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1fea734862
commit
2edb61758b
6 changed files with 85 additions and 41 deletions
|
@ -190,12 +190,12 @@ bool ChunkMap::getDataChunk(const std::string& peer_id,uint32_t size_hint,ftChun
|
|||
|
||||
if(it == _active_chunks_feed.end())
|
||||
{
|
||||
SourceChunksInfo *sci = getSourceChunksInfo(peer_id) ;
|
||||
|
||||
// 0 - Look into other pending chunks and slice from here.
|
||||
//
|
||||
for(std::map<std::string,Chunk>::iterator pit(_active_chunks_feed.begin());pit!=_active_chunks_feed.end();++pit)
|
||||
{
|
||||
SourceChunksInfo *sci = getSourceChunksInfo(pit->first) ;
|
||||
|
||||
if(sci->is_full || sci->cmap[pit->second._start / _chunk_size])
|
||||
{
|
||||
it = pit ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue