removed potentially harmful code. Warning: needs make clean in libretroshare

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2335 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-02-15 20:44:37 +00:00
parent 9303035d7f
commit 154ef63474
4 changed files with 32 additions and 40 deletions

View file

@ -206,32 +206,11 @@ void ftServer::run()
{
while(1)
{
//scan the uploads list in ftdatamultiplex and delete the items which time out
time_t now = time(NULL);
FileInfo info;
std::list<std::string> toDels;
std::map<std::string, ftFileProvider *>::iterator sit;
for(sit = mFtDataplex->mServers.begin(); sit != mFtDataplex->mServers.end(); sit++)
{
if (FileDetails(sit->first,RS_FILE_HINTS_UPLOAD,info))
{
if ((now - info.lastTS) > 10)
{
#ifdef SERVER_DEBUG
std::cout << "info.lastTS = " << info.lastTS << ", now=" << now << std::endl ;
#endif
toDels.push_back(sit->first);
}
}
}
if(!toDels.empty())
mFtDataplex->deleteServers(toDels) ;
mFtDataplex->deleteUnusedServers() ;
#ifdef WIN32
Sleep(1000);
Sleep(5000);
#else
sleep(1);
sleep(5);
#endif
}
}