mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -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 ;
|
bool should_notify_discovery = false ;
|
||||||
|
std::string item_gpg_id = rsPeers->getGPGId(item->PeerId()) ;
|
||||||
|
|
||||||
std::list<RsPeerNetItem>::iterator pit;
|
for (std::list<RsPeerNetItem>::iterator pit = item->rsPeerList.begin(); pit != item->rsPeerList.end(); pit++)
|
||||||
for (pit = item->rsPeerList.begin(); pit != item->rsPeerList.end(); pit++)
|
|
||||||
{
|
{
|
||||||
if(isDummyFriend(pit->pid))
|
if(isDummyFriend(pit->pid))
|
||||||
{
|
{
|
||||||
@ -671,7 +671,7 @@ void p3disc::recvPeerDetails(RsDiscReply *item, const std::string &certGpgId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool new_info = false;
|
bool new_info = false;
|
||||||
addDiscoveryData(item->PeerId(), pit->pid,rsPeers->getGPGId(item->PeerId()),
|
addDiscoveryData(item->PeerId(), pit->pid,item_gpg_id,
|
||||||
item->aboutId, pit->currentlocaladdr, pit->currentremoteaddr, 0, time(NULL),new_info);
|
item->aboutId, pit->currentlocaladdr, pit->currentremoteaddr, 0, time(NULL),new_info);
|
||||||
|
|
||||||
if(new_info)
|
if(new_info)
|
||||||
@ -853,7 +853,11 @@ void p3disc::recvDiscReply(RsDiscReply *dri)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add item to list for later process
|
// add item to list for later process
|
||||||
|
|
||||||
|
if(mDiscEnabled || dri->aboutId == rsPeers->getGPGId(dri->PeerId()))
|
||||||
mPendingDiscReplyInList.push_back(dri); // no delete
|
mPendingDiscReplyInList.push_back(dri); // no delete
|
||||||
|
else
|
||||||
|
delete dri ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user