mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed stupid bug that crashed the code in a different place
This commit is contained in:
parent
4eb6b0b066
commit
8fddb559b9
@ -944,7 +944,7 @@ bool p3PeerMgrIMPL::addFriend(const RsPeerId& input_id, const RsPgpId& input_gpg
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::map<RsPeerId, peerState>::iterator it;
|
std::map<RsPeerId, peerState>::iterator it;
|
||||||
if (mFriendList.end() != mFriendList.find(id))
|
if (mFriendList.end() != (it=mFriendList.find(id)))
|
||||||
{
|
{
|
||||||
#ifdef PEER_DEBUG
|
#ifdef PEER_DEBUG
|
||||||
std::cerr << "p3PeerMgrIMPL::addFriend() Already Exists" << std::endl;
|
std::cerr << "p3PeerMgrIMPL::addFriend() Already Exists" << std::endl;
|
||||||
@ -1029,8 +1029,8 @@ bool p3PeerMgrIMPL::addFriend(const RsPeerId& input_id, const RsPgpId& input_gpg
|
|||||||
pstate.netMode = netMode;
|
pstate.netMode = netMode;
|
||||||
pstate.lastcontact = lastContact;
|
pstate.lastcontact = lastContact;
|
||||||
|
|
||||||
it->second.gpg_id = input_gpg_id;
|
pstate.gpg_id = input_gpg_id;
|
||||||
it->second.skip_pgp_signature_validation = false;
|
pstate.skip_pgp_signature_validation = false;
|
||||||
|
|
||||||
/* addr & timestamps -> auto cleared */
|
/* addr & timestamps -> auto cleared */
|
||||||
|
|
||||||
@ -1821,7 +1821,7 @@ bool p3PeerMgrIMPL::getExtAddressReportedByFriends(sockaddr_storage &addr, uint8
|
|||||||
{
|
{
|
||||||
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
|
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
|
||||||
|
|
||||||
uint32_t count ;
|
uint32_t count =0;
|
||||||
|
|
||||||
locked_computeCurrentBestOwnExtAddressCandidate(addr,count) ;
|
locked_computeCurrentBestOwnExtAddressCandidate(addr,count) ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user