Restore Stunner functionality

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7394 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2014-06-01 09:30:27 +00:00
parent c87efec81b
commit 8d721c7a95
2 changed files with 9 additions and 3 deletions

View File

@ -143,7 +143,7 @@ int p3BitDht::NodeCallback(const bdId *id, uint32_t peerflags)
bdStdPrintId(std::cerr, id);
std::cerr << std::endl;
#endif
//mProxyStunner->addStunPeer(id->addr, NULL);
mProxyStunner->addStunPeer(id->addr, NULL);
}
/* else */ // removed else until we have lots of peers.
@ -154,7 +154,7 @@ int p3BitDht::NodeCallback(const bdId *id, uint32_t peerflags)
bdStdPrintId(std::cerr, id);
std::cerr << std::endl;
#endif
//mDhtStunner->addStunPeer(id->addr, NULL);
mDhtStunner->addStunPeer(id->addr, NULL);
}
}
return 1;

View File

@ -668,7 +668,13 @@ bool UdpStunner::storeStunPeer(const struct sockaddr_in &remote, const char *
}
}
TouStunPeer peer(std::string(peerid), remote);
std::string peerstring;
if (peerid)
{
peerstring = std::string(peerid);
}
TouStunPeer peer(peerstring, remote);
if (sent)
{
peer.failCount += 1;