mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 20:12:29 -04:00
added chunk splitting in case part of the file transfer data does not come. Added strategy to ask again for missing data. The combination of these two cannot result into an infinite loop (as before)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4610 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
ad04f62e80
commit
dd474cfddf
2 changed files with 94 additions and 12 deletions
|
@ -34,7 +34,7 @@ class ftChunk
|
|||
public:
|
||||
typedef uint64_t ChunkId ;
|
||||
|
||||
ftChunk():offset(0), size(0), ts(0) {}
|
||||
ftChunk():offset(0), size(0), ts(0),ref_cnt(NULL) {}
|
||||
|
||||
friend std::ostream& operator<<(std::ostream& o,const ftChunk& f) ;
|
||||
|
||||
|
@ -42,6 +42,7 @@ class ftChunk
|
|||
uint64_t size; // size remaining to download
|
||||
ChunkId id ; // id of the chunk. Equal to the starting offset of the chunk
|
||||
time_t ts; // time of last data received
|
||||
int *ref_cnt; // shared counter of number of sub-blocks. Used when a slice gets split.
|
||||
std::string peer_id ;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue