Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/pqi/p3peermgr.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,14 @@ bool p3PeerMgrIMPL::addFriend(const RsPeerId& input_id, const RsPgpId& input_gpg
mLinkMgr->addFriend(id, vs_dht != RS_VS_DHT_OFF);
}

service_flags &= servicePermissionFlags(gpg_id) ; // Always reduce the permissions.
{
RS_STACK_MUTEX(mPeerMtx);
auto it = mFriendsPermissionFlags.find(gpg_id);
if(it != mFriendsPermissionFlags.end())
{
service_flags &= it->second; // Always reduce the permissions for existing friends.
}
}
#ifdef RS_CHATSERVER //Defined by chatserver
setServicePermissionFlags(gpg_id,RS_NODE_PERM_NONE) ;
#else
Expand Down
2 changes: 1 addition & 1 deletion src/retroshare/rspeers.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const ServicePermissionFlags RS_NODE_PERM_NONE ( 0x00000000 ) ;// 0x1, 0x2
const ServicePermissionFlags RS_NODE_PERM_DIRECT_DL ( 0x00000008 ) ;// Accept to directly DL from this peer (breaks anonymity)
const ServicePermissionFlags RS_NODE_PERM_ALLOW_PUSH ( 0x00000010 ) ;// Auto-DL files recommended by this peer
const ServicePermissionFlags RS_NODE_PERM_REQUIRE_WL ( 0x00000020 ) ;// Require white list clearance for connection
const ServicePermissionFlags RS_NODE_PERM_DEFAULT = RS_NODE_PERM_DIRECT_DL ;
const ServicePermissionFlags RS_NODE_PERM_DEFAULT = RS_NODE_PERM_NONE ;
const ServicePermissionFlags RS_NODE_PERM_ALL = RS_NODE_PERM_DIRECT_DL | RS_NODE_PERM_ALLOW_PUSH | RS_NODE_PERM_REQUIRE_WL;

// ...
Expand Down
Loading