added regular cleaning of inactive chunks and slices, so that they can be treated by a different peer

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2102 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-01-21 12:31:00 +00:00
parent f481dbef59
commit e2b807aad7
6 changed files with 112 additions and 3 deletions

View file

@ -65,6 +65,11 @@ class ftFileCreator: public ftFileProvider
//
bool getMissingChunk(const std::string& peer_id,uint32_t size_hint,uint64_t& offset, uint32_t& size,bool& is_chunk_map_too_old);
// Takes care of purging any inactive chunks. This should be called regularly, because some peers may disconnect
// and let inactive chunks not finished.
//
void removeInactiveChunks() ;
// actually store data in the file, and update chunks info
//
bool addFileData(uint64_t offset, uint32_t chunk_size, void *data);