mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-01 19:06:20 -05:00
store exaddr from upnp to stun
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1763 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fcaae207ef
commit
81e1978a83
@ -649,8 +649,7 @@ void p3ConnectMgr::netUpnpCheck()
|
|||||||
struct sockaddr_in extAddr;
|
struct sockaddr_in extAddr;
|
||||||
int upnpState = netAssistFirewallActive();
|
int upnpState = netAssistFirewallActive();
|
||||||
|
|
||||||
if ((upnpState < 0) ||
|
if ((upnpState == 0) && (delta > MAX_UPNP_INIT))
|
||||||
((upnpState == 0) && (delta > MAX_UPNP_INIT)))
|
|
||||||
{
|
{
|
||||||
#ifdef CONN_DEBUG
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << "p3ConnectMgr::netUpnpCheck() ";
|
std::cerr << "p3ConnectMgr::netUpnpCheck() ";
|
||||||
@ -1062,12 +1061,13 @@ bool p3ConnectMgr::stunCheck()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef CONN_DEBUG
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << "Stun : No Ext Address. Checking upnp est address." << std::endl;
|
std::cerr << "Stun : No Ext Address. Checking upnp ext address." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
struct sockaddr_in extAddr;
|
struct sockaddr_in extAddr;
|
||||||
bool upnpExtAdress = netAssistExtAddress(extAddr);
|
bool upnpExtAdress = netAssistExtAddress(extAddr);
|
||||||
if (upnpExtAdress) {
|
if (upnpExtAdress) {
|
||||||
//don't do a reset
|
//don't do a reset
|
||||||
|
mStunExtAddr = extAddr;
|
||||||
#ifdef CONN_DEBUG
|
#ifdef CONN_DEBUG
|
||||||
std::cerr << "Found upnp Ext Address. don't do a reset." << std::endl;
|
std::cerr << "Found upnp Ext Address. don't do a reset." << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user