mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-12 17:34:32 -05:00
corrected bug responsible for mixing IP lists between peers of same GPG id (connection attempt to other peer responded with connection to oneself). Added additional debug info in p3disc.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5.0@3143 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
dac2dce479
commit
a38ae6241e
@ -2048,6 +2048,10 @@ int AuthSSL::VerifyX509Callback(int preverify_ok, X509_STORE_CTX *ctx)
|
||||
//sslcert *cert = NULL;
|
||||
std::string certId;
|
||||
getX509id(X509_STORE_CTX_get_current_cert(ctx), certId);
|
||||
|
||||
if(certId == mConnMgr->getOwnId())
|
||||
return false ;
|
||||
|
||||
if (!mConnMgr->isFriend(certId)) {
|
||||
//we've got a new ssl id
|
||||
preverify_ok = false;
|
||||
|
@ -539,8 +539,8 @@ void p3disc::recvPeerDetails(RsDiscReply *item)
|
||||
|
||||
addDiscoveryData(item->PeerId(), pitem->pid, pitem->currentlocaladdr, pitem->currentremoteaddr, 0, time(NULL));
|
||||
|
||||
#ifdef P3DISC_DEBUG
|
||||
std::cerr << "p3disc::recvPeerFriendMsg() Peer Config Item:" << std::endl;
|
||||
#ifdef P3DISC_DEBUG
|
||||
std::cerr << "p3disc::recvPeerFriendMsg() Peer Config Item:" << std::endl;
|
||||
pitem->print(std::cerr, 10);
|
||||
std::cerr << std::endl;
|
||||
#endif
|
||||
@ -595,6 +595,10 @@ void p3disc::recvPeerDetails(RsDiscReply *item)
|
||||
}
|
||||
#ifdef P3DISC_DEBUG
|
||||
std::cerr << "Friend is already connected -> not updating" << std::endl;
|
||||
|
||||
std::cerr << "Setting address list to peer " << pitem->pid << ", to be:" << std::endl ;
|
||||
for(std::list<IpAddressTimed>::const_iterator it(pitem->ipAddressList.begin());it!=pitem->ipAddressList.end();++it)
|
||||
std::cerr << " " << (*it).ipAddr << " (" << (*it).seenTime << ")" << std::endl ;
|
||||
#endif
|
||||
|
||||
// allways update address list, except if it's ours
|
||||
|
Loading…
Reference in New Issue
Block a user