mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 19:12:28 -04:00
Added consistent display of chunk map
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1837 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
adbdb51c5d
commit
e88d2c1928
7 changed files with 52 additions and 15 deletions
|
@ -307,17 +307,19 @@ void ftServer::getDwlDetails(std::list<DwlDetails> & details)
|
|||
|
||||
bool ftServer::FileChunksDetails(const std::string& hash,FileChunksInfo& info)
|
||||
{
|
||||
// for know put some dummy info. It's for display sake only.
|
||||
info.chunk_size = 1024*1024 ;
|
||||
info.file_size = 250*info.chunk_size - 123 ; // last chunk is not complete.
|
||||
info.chunks.resize(250,FileChunksInfo::CHUNK_DONE) ;
|
||||
int n = rand()%150 + 50 ;
|
||||
for(int i=0;i<10;++i)
|
||||
info.chunks[n+i] = FileChunksInfo::CHUNK_ACTIVE ;
|
||||
for(int i=n+10;i<250;++i)
|
||||
info.chunks[i] = FileChunksInfo::CHUNK_OUTSTANDING ;
|
||||
|
||||
return true ;
|
||||
return mFtController->getFileChunksDetails(hash,info);
|
||||
//
|
||||
// // for know put some dummy info. It's for display sake only.
|
||||
// info.chunk_size = 1024*1024 ;
|
||||
// info.file_size = 250*info.chunk_size - 123 ; // last chunk is not complete.
|
||||
// info.chunks.resize(250,FileChunksInfo::CHUNK_DONE) ;
|
||||
// int n = rand()%150 + 50 ;
|
||||
// for(int i=0;i<10;++i)
|
||||
// info.chunks[n+i] = FileChunksInfo::CHUNK_ACTIVE ;
|
||||
// for(int i=n+10;i<250;++i)
|
||||
// info.chunks[i] = FileChunksInfo::CHUNK_OUTSTANDING ;
|
||||
//
|
||||
// return true ;
|
||||
}
|
||||
|
||||
/* Directory Handling */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue