mirror of
https://github.com/RetroShare/libretroshare.git
synced 2026-09-14 11:05:45 +05:00
Merge pull request #286 from jolavillette/FixUseAsDirectSourceWhenAcceptingFriendViaActivityFeed
Fixed Use as direct source being automatically enabled when re-accepting a denied friend via Activity / Peer Details
This commit is contained in:
commit
ec6fbf1328
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
// ...
|
||||
|
||||
Loading…
Reference in New Issue
Block a user