- added a generic RsItem to the turtle router and the methods to route it. This makes the code much more elegant.

- suppressed a cross mutex lock bug that happened rarely while digging tunnels
- changed FileDetails in ftServer so that it's now possiblt to search for hashes of files being downloaded
- improved the search code in ftdatamultiplex
- added some comments to the turtle code



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1964 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2010-01-02 21:30:19 +00:00
parent 03cbedb224
commit b83e894640
7 changed files with 388 additions and 292 deletions

View file

@ -367,24 +367,19 @@ bool ftServer::FileUploads(std::list<std::string> &hashs)
bool ftServer::FileDetails(std::string hash, uint32_t hintflags, FileInfo &info)
{
bool found = false;
if (hintflags & RS_FILE_HINTS_DOWNLOAD)
{
//found = mFtDataplex->FileDetails(hash, hintflags, info);
//
// Use Controller for download searches.
found = mFtController->FileDetails(hash, info);
}
else if (hintflags & RS_FILE_HINTS_UPLOAD)
{
found = mFtDataplex->FileDetails(hash, hintflags, info);
}
if(mFtController->FileDetails(hash, info))
return true ;
if (!found)
{
found = mFtSearch->search(hash, 0, hintflags, info);
}
return found;
if(hintflags & RS_FILE_HINTS_UPLOAD)
if(mFtDataplex->FileDetails(hash, hintflags, info))
return true ;
if(hintflags & ~(RS_FILE_HINTS_UPLOAD | RS_FILE_HINTS_DOWNLOAD))
if(mFtSearch->search(hash, 0, hintflags, info))
return true ;
return false;
}
/***************************************************************/