mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-22 13:24:26 -04:00
Another fix for the discovery fiasco... Turns out that I broke the system with my previous changes.
- Allow certificates through with no attached GPG Certs. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4852 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
00ff694e10
commit
41bff1d839
1 changed files with 11 additions and 7 deletions
|
@ -648,16 +648,15 @@ void p3disc::recvPeerDetails(RsDiscReply *item, const std::string &certGpgId)
|
||||||
std::cerr << "p3disc::recvPeerFriendMsg() From: " << item->PeerId() << " About " << item->aboutId << std::endl;
|
std::cerr << "p3disc::recvPeerFriendMsg() From: " << item->PeerId() << " About " << item->aboutId << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (certGpgId.empty()) {
|
if (certGpgId.empty())
|
||||||
|
{
|
||||||
#ifdef P3DISC_DEBUG
|
#ifdef P3DISC_DEBUG
|
||||||
std::cerr << "p3disc::recvPeerFriendMsg() gpg cert is not good, aborting" << std::endl;
|
std::cerr << "p3disc::recvPeerFriendMsg() gpg cert Id is empty - cert not transmitted" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (item->aboutId == "" || item->aboutId != certGpgId) {
|
else if (item->aboutId == "" || item->aboutId != certGpgId)
|
||||||
#ifdef P3DISC_DEBUG
|
{
|
||||||
std::cerr << "p3disc::recvPeerFriendMsg() Error : about id is not the same as gpg id." << std::endl;
|
std::cerr << "p3disc::recvPeerFriendMsg() Error : about id is not the same as gpg id." << std::endl;
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -680,10 +679,10 @@ void p3disc::recvPeerDetails(RsDiscReply *item, const std::string &certGpgId)
|
||||||
|
|
||||||
#ifdef P3DISC_DEBUG
|
#ifdef P3DISC_DEBUG
|
||||||
std::cerr << "p3disc::recvPeerFriendMsg() Peer Config Item:" << std::endl;
|
std::cerr << "p3disc::recvPeerFriendMsg() Peer Config Item:" << std::endl;
|
||||||
|
|
||||||
pit->print(std::cerr, 10);
|
pit->print(std::cerr, 10);
|
||||||
std::cerr << std::endl;
|
std::cerr << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (pit->pid != rsPeers->getOwnId())
|
if (pit->pid != rsPeers->getOwnId())
|
||||||
{
|
{
|
||||||
// Apparently, the connect manager won't add a friend if the gpg id is not
|
// Apparently, the connect manager won't add a friend if the gpg id is not
|
||||||
|
@ -836,6 +835,11 @@ void p3disc::recvDiscReply(RsDiscReply *dri)
|
||||||
{
|
{
|
||||||
RsStackMutex stack(mDiscMtx); /********** STACK LOCKED MTX ******/
|
RsStackMutex stack(mDiscMtx); /********** STACK LOCKED MTX ******/
|
||||||
|
|
||||||
|
#ifdef P3DISC_DEBUG
|
||||||
|
std::cerr << "p3disc::recvDiscReply() From: " << dri->PeerId() << " About: " << dri->aboutId;
|
||||||
|
std::cerr << std::endl;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* search pending item and remove it, when already exist */
|
/* search pending item and remove it, when already exist */
|
||||||
std::list<RsDiscReply*>::iterator it;
|
std::list<RsDiscReply*>::iterator it;
|
||||||
for (it = mPendingDiscReplyInList.begin(); it != mPendingDiscReplyInList.end(); it++)
|
for (it = mPendingDiscReplyInList.begin(); it != mPendingDiscReplyInList.end(); it++)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue