Found the CacheTransfer Killing Bug... misplaced brackets!

I've also switched on the debug output so we can see when it happens.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4333 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-06-25 11:49:38 +00:00
parent fc959a0ad6
commit 9e420ce08e

View File

@ -356,15 +356,16 @@ void ftController::cleanCacheDownloads()
if (((it->second)->mFlags & RS_FILE_HINTS_CACHE) && it->second->mState != ftFileControl::DOWNLOADING)
// check if a cache file is downloaded, if the case, timeout the transfer after TIMOUT_CACHE_FILE_TRANSFER
{
#ifdef CONTROL_DEBUG
std::cerr << "ftController::run() cache transfer found. age of this tranfer is :" << (int)(time(NULL) - (it->second)->mCreateTime);
std::cerr << std::endl;
#endif
if ((now > (it->second)->mCreator->creationTimeStamp()) + TIMOUT_CACHE_FILE_TRANSFER)
{
#ifdef CONTROL_DEBUG
#endif
if (now > (it->second)->mCreator->creationTimeStamp() + TIMOUT_CACHE_FILE_TRANSFER)
{
std::cerr << "ftController::run() cache transfer to old. Cancelling transfer. Hash :" << (it->second)->mHash << ", time=" << (it->second)->mCreateTime << ", now = " << time(NULL) ;
std::cerr << "ftController::run() creationTimeStamp: " << (it->second)->mCreator->creationTimeStamp();
std::cerr << std::endl;
#ifdef CONTROL_DEBUG
#endif
toCancel.push_back((it->second)->mHash);
}