mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-28 10:32:22 -04:00
Bugfixes and extra debugging for file transfer.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@791 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6343de176e
commit
80f4686100
12 changed files with 333 additions and 230 deletions
|
@ -44,6 +44,8 @@ FileIndexStore::~FileIndexStore()
|
|||
* #define FIS_DEBUG 1
|
||||
**/
|
||||
|
||||
#define FIS_DEBUG 1
|
||||
|
||||
/* actual load, once data available */
|
||||
int FileIndexStore::loadCache(const CacheData &data)
|
||||
{
|
||||
|
@ -353,6 +355,10 @@ int FileIndexStore::SearchHash(std::string hash, std::list<FileDetail> &results)
|
|||
#endif
|
||||
for(pit = indices.begin(); pit != indices.end(); pit++)
|
||||
{
|
||||
#ifdef FIS_DEBUG
|
||||
std::cerr << "FileIndexStore::SearchHash() Searching: Peer ";
|
||||
std::cerr << pit->first << std::endl;
|
||||
#endif
|
||||
firesults.clear();
|
||||
|
||||
(pit->second)->searchHash(hash, firesults);
|
||||
|
@ -373,6 +379,12 @@ int FileIndexStore::SearchHash(std::string hash, std::list<FileDetail> &results)
|
|||
|
||||
}
|
||||
|
||||
|
||||
#ifdef FIS_DEBUG
|
||||
std::cerr << "FileIndexStore::SearchHash() Found " << results.size();
|
||||
std::cerr << " Results from " << indices.size() << " Peers" << std::endl;
|
||||
#endif
|
||||
|
||||
unlockData();
|
||||
return results.size();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue