Added dynamic choose of sources for chunk crc requests. Fixes the bug that would let

a transfer not finish if the original surce for a crc is not here anymore.

If you have a unfinished transfer do a force-check after restart to get back chunks that 
where still on verificaiton stage.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5315 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-07-19 20:52:04 +00:00
parent b52fc7708f
commit 24f8ee6222
7 changed files with 108 additions and 34 deletions

View file

@ -86,7 +86,7 @@ class ftFileCreator: public ftFileProvider
// Looks into the chunkmap for downloaded chunks that have not yet been certified.
// For each of them, returns the chunk number and a source peer to ask the CRC to.
//
void getChunksToCheck(std::vector<std::pair<uint32_t,std::list<std::string> > >& chunks_to_ask) ;
void getChunksToCheck(std::vector<uint32_t>& chunks_to_ask) ;
/*
* creation functions for FileCreator
@ -107,6 +107,10 @@ class ftFileCreator: public ftFileProvider
// removes the designated file source from the chunkmap.
void removeFileSource(const std::string& peer_id) ;
// Get all available sources for this chunk
//
void getSourcesList(uint32_t chunk_number,std::vector<std::string>& sources) ;
// Returns resets the time stamp of the last data receive.
time_t lastRecvTimeStamp() ;
void resetRecvTimeStamp() ;