mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
adding a deleted ssl friends persistence in p3disc to avoid getting back a friend we just deleted
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2051 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
0318e73917
commit
3f22602b6c
5 changed files with 138 additions and 51 deletions
|
@ -571,7 +571,7 @@ std::string p3Peers::getGPGId(std::string sslid_or_gpgid)
|
|||
return AuthGPG::getAuthGPG()->getGPGOwnId();
|
||||
}
|
||||
peerConnectState pcs;
|
||||
if (mConnMgr->getFriendNetStatus(sslid_or_gpgid, pcs)) {
|
||||
if (mConnMgr->getFriendNetStatus(sslid_or_gpgid, pcs) || mConnMgr->getOthersNetStatus(sslid_or_gpgid, pcs)) {
|
||||
return pcs.gpg_id;
|
||||
} else {
|
||||
if ( AuthGPG::getAuthGPG()->isGPGId(sslid_or_gpgid)) {
|
||||
|
@ -637,9 +637,14 @@ bool p3Peers::isDummyFriend(std::string ssl_id) {
|
|||
bool p3Peers::removeFriend(std::string ssl_or_gpgid)
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
std::cerr << "p3Peers::removeFriend() " << id;
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "p3Peers::removeFriend() " << id << std::endl;
|
||||
#endif
|
||||
if (ssl_or_gpgid == AuthGPG::getAuthGPG()->getGPGOwnId()) {
|
||||
#ifdef P3PEERS_DEBUG
|
||||
std::cerr << "p3Peers::removeFriend() fail : we're not going to remove our own GPG id." << std::endl;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
//will remove if it's a gpg id
|
||||
AuthGPG::getAuthGPG()->setAcceptToConnectGPGCertificate(ssl_or_gpgid, false);
|
||||
|
||||
|
|
|
@ -2032,6 +2032,7 @@ int RsServer::StartupRetroShare()
|
|||
mConfigMgr->addConfiguration("forums.cfg", mForums);
|
||||
mConfigMgr->addConfiguration("channels.cfg", mChannels);
|
||||
mConfigMgr->addConfiguration("turtle.cfg", tr);
|
||||
mConfigMgr->addConfiguration("p3disc.cfg", ad);
|
||||
|
||||
ftserver->addConfiguration(mConfigMgr);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue