mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-15 12:32:37 -04:00
Modified DHT to notify of all possible stun peers, as it doesn't know whether we need to stun or not.
Added a Type parameter, so that the connection Mgr can determine if there is an external port available or not. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@354 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
100a7aea82
commit
685182ff0b
5 changed files with 31 additions and 22 deletions
|
@ -1339,9 +1339,13 @@ bool p3DhtMgr::dhtResultSearch(std::string idhash,
|
|||
doNotify = true;
|
||||
}
|
||||
|
||||
/* if stun not happy yet - doStun aswell */
|
||||
if ((mDhtState != DHT_STATE_OFF) &&
|
||||
(mDhtState != DHT_STATE_ACTIVE))
|
||||
/* if stun not happy yet - doStun as well..
|
||||
* as the DHT doesn't know if the Stun is happy - send
|
||||
* it through always!
|
||||
* if ((mDhtState != DHT_STATE_OFF) &&
|
||||
* (mDhtState != DHT_STATE_ACTIVE))
|
||||
*/
|
||||
if (mDhtState != DHT_STATE_OFF)
|
||||
{
|
||||
doStun = true;
|
||||
stunFlags = RS_STUN_FRIEND | RS_STUN_ONLINE;
|
||||
|
@ -1375,7 +1379,7 @@ bool p3DhtMgr::dhtResultSearch(std::string idhash,
|
|||
|
||||
if (doStun)
|
||||
{
|
||||
connCb->stunStatus(idhash, raddr, stunFlags);
|
||||
connCb->stunStatus(idhash, raddr, type, stunFlags);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue