mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
debugging tunnel handlign with permissions
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-FileSharingPermissions@5774 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
6b6f961e94
commit
997e833cc8
4 changed files with 16 additions and 21 deletions
|
@ -2288,20 +2288,24 @@ bool p3turtle::performLocalHashSearch(const TurtleFileHash& hash,const std::stri
|
|||
{
|
||||
bool res = rsFiles->FileDetails(hash, RS_FILE_HINTS_NETWORK_WIDE | RS_FILE_HINTS_LOCAL | RS_FILE_HINTS_EXTRA | RS_FILE_HINTS_SPEC_ONLY | RS_FILE_HINTS_DOWNLOAD, info);
|
||||
|
||||
// The call to computeHashPeerClearance() return a combination of RS_FILE_HINTS_NETWORK_WIDE and RS_FILE_HINTS_BROWSABLE
|
||||
// This is an additional computation cost, but the way it's written here, it's only called when res is true.
|
||||
//
|
||||
res = res && (RS_FILE_HINTS_NETWORK_WIDE & rsPeers->computePeerPermissionFlags(peer_id,info.storage_permission_flags,info.parent_groups)) ;
|
||||
|
||||
std::cerr << "p3turtle: performing local hash search for hash " << hash << std::endl;
|
||||
|
||||
if(res)
|
||||
{
|
||||
std::cerr << "Found hash: " << std::endl;
|
||||
std::cerr << " hash = " << hash << std::endl;
|
||||
std::cerr << " peer = " << peer_id << std::endl;
|
||||
std::cerr << " flags = " << info.storage_permission_flags << std::endl;
|
||||
std::cerr << " local = " << rsFiles->FileDetails(hash, RS_FILE_HINTS_NETWORK_WIDE | RS_FILE_HINTS_LOCAL | RS_FILE_HINTS_EXTRA | RS_FILE_HINTS_SPEC_ONLY | RS_FILE_HINTS_DOWNLOAD, info) << std::endl;
|
||||
std::cerr << " groups= " ; for(std::list<std::string>::const_iterator it(info.parent_groups.begin());it!=info.parent_groups.end();++it) std::cerr << (*it) << ", " ; std::cerr << std::endl;
|
||||
std::cerr << " clear = " << rsPeers->computePeerPermissionFlags(peer_id,info.storage_permission_flags,info.parent_groups) << std::endl;
|
||||
}
|
||||
|
||||
// The call to computeHashPeerClearance() return a combination of RS_FILE_HINTS_NETWORK_WIDE and RS_FILE_HINTS_BROWSABLE
|
||||
// This is an additional computation cost, but the way it's written here, it's only called when res is true.
|
||||
//
|
||||
res = res && (RS_FILE_HINTS_NETWORK_WIDE & rsPeers->computePeerPermissionFlags(peer_id,info.storage_permission_flags,info.parent_groups)) ;
|
||||
|
||||
return res ;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue