mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-16 04:52:37 -04:00
Revert "Ad a friend right upon connection when necessary. Removed two core mutex to do that, it might be dangerous, we will see"
This reverts commit 430b13ab7d12b0911e072887c8347b6855d173af. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2042 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1c23a2fb2c
commit
5349ab101a
4 changed files with 18 additions and 23 deletions
|
@ -2005,24 +2005,23 @@ bool p3ConnectMgr::addFriend(std::string id, std::string gpg_id, uint32_t netMod
|
|||
/* (1) already exists */
|
||||
return false;
|
||||
}
|
||||
/* so four possibilities
|
||||
* (1) already exists as friend -> do nothing.
|
||||
* (2) is in others list -> move over.
|
||||
* (3) is non-existant -> create new one.
|
||||
*/
|
||||
/* so four possibilities
|
||||
* (1) already exists as friend -> do nothing.
|
||||
* (2) is in others list -> move over.
|
||||
* (3) is non-existant -> create new one.
|
||||
*/
|
||||
|
||||
#ifdef CONN_DEBUG
|
||||
std::cerr << "p3ConnectMgr::addFriend() " << id << "; gpg_id : " << gpg_id << std::endl;
|
||||
std::cerr << "p3ConnectMgr::addFriend() " << id << "; gpg_id : " << gpg_id << std::endl;
|
||||
#endif
|
||||
|
||||
#ifdef CONN_DEBUG
|
||||
std::cerr << "p3ConnectMgr::addFriend() removing dummy friend" << std::endl;
|
||||
std::cerr << "p3ConnectMgr::addFriend() removing dummy friend" << std::endl;
|
||||
#endif
|
||||
//remove any dummy friend because we just add a real ssl friend
|
||||
removeFriend("dummy"+ gpg_id);
|
||||
//remove any dummy friend because we just add a real ssl friend
|
||||
removeFriend("dummy"+ gpg_id);
|
||||
|
||||
{
|
||||
RsStackMutex stack(connMtx); /****** STACK LOCK MUTEX *******/
|
||||
RsStackMutex stack(connMtx); /****** STACK LOCK MUTEX *******/
|
||||
|
||||
|
||||
std::map<std::string, peerConnectState>::iterator it;
|
||||
|
@ -2115,10 +2114,6 @@ bool p3ConnectMgr::addFriend(std::string id, std::string gpg_id, uint32_t netMod
|
|||
|
||||
IndicateConfigChanged(); /**** INDICATE MSG CONFIG CHANGED! *****/
|
||||
|
||||
}
|
||||
//usefull because we might add a friend by receiving an ssl connection, so we want the monitors to act right now
|
||||
tickMonitors();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue