mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-20 19:06:09 -05:00
Improved CRC32Map checking in several ways:
- servers now compute the map in a separate thread - CRC32Maps are kept in cache for 30 mins - CRC32Maps requests cannot be used to overflood a server anymore since their number is limited. - Transfer modules now send keep alive packets to maintain tunnels when asking for a CRC32Map git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4661 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a9cb864717
commit
d43a131c04
7 changed files with 197 additions and 32 deletions
|
|
@ -318,15 +318,4 @@ int ftFileProvider::initializeFileAttrs()
|
|||
return 1;
|
||||
}
|
||||
|
||||
bool ftFileProvider::getCRC32Map(CRC32Map& crc_map)
|
||||
{
|
||||
if(!initializeFileAttrs())
|
||||
{
|
||||
std::cerr << "ftFileProvider::getCRC32Map(...): ERROR: can't initialize file !" << std::endl ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
std::cerr << "ftFileProvider::getClientMap(): computing CRC32 map for file " << file_name << " (" << hash << ")" << std::endl ;
|
||||
return RsDirUtil::crc32File(fd,mSize,ChunkMap::CHUNKMAP_FIXED_CHUNK_SIZE,crc_map) ;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue