mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-10 18:15:18 -04:00
improved strategy of cleaning unfinished cache transfers
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4171 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
61b387447f
commit
993e0d225c
4 changed files with 14 additions and 7 deletions
|
@ -35,7 +35,9 @@ ftFileCreator::ftFileCreator(const std::string& path, uint64_t size, const std::
|
|||
std::cerr << std::endl;
|
||||
#endif
|
||||
RsStackMutex stack(ftcMutex); /********** STACK LOCKED MTX ******/
|
||||
_last_recv_time_t = time(NULL) ;
|
||||
time_t now = time(NULL) ;
|
||||
_last_recv_time_t = now ;
|
||||
_creation_time = now ;
|
||||
}
|
||||
|
||||
bool ftFileCreator::getFileData(const std::string& peer_id,uint64_t offset, uint32_t &chunk_size, void *data)
|
||||
|
@ -64,6 +66,11 @@ bool ftFileCreator::getFileData(const std::string& peer_id,uint64_t offset, uint
|
|||
return false ;
|
||||
}
|
||||
|
||||
time_t ftFileCreator::creationTimeStamp()
|
||||
{
|
||||
RsStackMutex stack(ftcMutex); /********** STACK LOCKED MTX ******/
|
||||
return _creation_time ;
|
||||
}
|
||||
time_t ftFileCreator::lastRecvTimeStamp()
|
||||
{
|
||||
RsStackMutex stack(ftcMutex); /********** STACK LOCKED MTX ******/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue