- implemented bidirectional exchange of chunk maps for direct downloads, to allow showing proper completion of transfers from direct friends.

- moved the direction flag upward in the pipeline (ftDataSend instead of p3turtle)




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3313 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-07-25 19:04:31 +00:00
parent 569ac25843
commit cee8600a93
13 changed files with 483 additions and 71 deletions

View file

@ -528,7 +528,7 @@ bool ftDataMultiplex::handleRecvClientChunkMapRequest(const std::string& peerId,
(it->second).mCreator->getAvailabilityMap(cmap);
}
mDataSend->sendChunkMap(peerId,hash,cmap);
mDataSend->sendChunkMap(peerId,hash,cmap,false);
return true ;
}
@ -574,7 +574,7 @@ bool ftDataMultiplex::handleRecvServerChunkMapRequest(const std::string& peerId,
it->second->getAvailabilityMap(cmap);
}
mDataSend->sendChunkMap(peerId,hash,cmap);
mDataSend->sendChunkMap(peerId,hash,cmap,true);
return true;
}
@ -719,14 +719,14 @@ bool ftDataMultiplex::getClientChunkMap(const std::string& upload_hash,const std
// If the map is too old then we should ask an other map to the peer.
//
if(too_old)
sendChunkMapRequest(peerId,upload_hash);
sendChunkMapRequest(peerId,upload_hash,true);
return true ;
}
bool ftDataMultiplex::sendChunkMapRequest(const std::string& peer_id,const std::string& hash)
bool ftDataMultiplex::sendChunkMapRequest(const std::string& peer_id,const std::string& hash,bool is_client)
{
return mDataSend->sendChunkMapRequest(peer_id,hash);
return mDataSend->sendChunkMapRequest(peer_id,hash,is_client);
}
bool ftDataMultiplex::sendCRCMapRequest(const std::string& peer_id,const std::string& hash,const CompressedChunkMap&)
{