mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
disabled adding new keys from friends of friends when discovery if off
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5016 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
c918ac84af
commit
75f3a6a5d8
@ -661,9 +661,9 @@ void p3disc::recvPeerDetails(RsDiscReply *item, const std::string &certGpgId)
|
||||
}
|
||||
|
||||
bool should_notify_discovery = false ;
|
||||
std::string item_gpg_id = rsPeers->getGPGId(item->PeerId()) ;
|
||||
|
||||
std::list<RsPeerNetItem>::iterator pit;
|
||||
for (pit = item->rsPeerList.begin(); pit != item->rsPeerList.end(); pit++)
|
||||
for (std::list<RsPeerNetItem>::iterator pit = item->rsPeerList.begin(); pit != item->rsPeerList.end(); pit++)
|
||||
{
|
||||
if(isDummyFriend(pit->pid))
|
||||
{
|
||||
@ -671,8 +671,8 @@ void p3disc::recvPeerDetails(RsDiscReply *item, const std::string &certGpgId)
|
||||
}
|
||||
|
||||
bool new_info = false;
|
||||
addDiscoveryData(item->PeerId(), pit->pid,rsPeers->getGPGId(item->PeerId()),
|
||||
item->aboutId, pit->currentlocaladdr, pit->currentremoteaddr, 0, time(NULL),new_info);
|
||||
addDiscoveryData(item->PeerId(), pit->pid,item_gpg_id,
|
||||
item->aboutId, pit->currentlocaladdr, pit->currentremoteaddr, 0, time(NULL),new_info);
|
||||
|
||||
if(new_info)
|
||||
should_notify_discovery = true ;
|
||||
@ -717,10 +717,10 @@ void p3disc::recvPeerDetails(RsDiscReply *item, const std::string &certGpgId)
|
||||
|
||||
/* add into NetMgr and non-search, so we can detect connect attempts */
|
||||
mNetMgr->netAssistFriend(pit->pid,false);
|
||||
|
||||
|
||||
/* inform NetMgr that we know this peer */
|
||||
mNetMgr->netAssistKnownPeer(pit->pid, pit->currentremoteaddr,
|
||||
NETASSIST_KNOWN_PEER_FOF | NETASSIST_KNOWN_PEER_OFFLINE);
|
||||
NETASSIST_KNOWN_PEER_FOF | NETASSIST_KNOWN_PEER_OFFLINE);
|
||||
|
||||
continue;
|
||||
}
|
||||
@ -853,7 +853,11 @@ void p3disc::recvDiscReply(RsDiscReply *dri)
|
||||
}
|
||||
|
||||
// add item to list for later process
|
||||
mPendingDiscReplyInList.push_back(dri); // no delete
|
||||
|
||||
if(mDiscEnabled || dri->aboutId == rsPeers->getGPGId(dri->PeerId()))
|
||||
mPendingDiscReplyInList.push_back(dri); // no delete
|
||||
else
|
||||
delete dri ;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user