mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-04 20:34:26 -04:00
BUGFIX: Big BUG in External Port notification! FIXED.
An invalid comparison was being made - meaning the EXT_PORT_FLAG was not set. This can lead to failed connection attempts. Added dht_check_peers program. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@409 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
d335e37c8d
commit
0c0147abe6
3 changed files with 18 additions and 15 deletions
|
@ -278,7 +278,7 @@ void p3ConnectMgr::netStartup()
|
|||
default:
|
||||
/* Force it here (could be default!) */
|
||||
ownState.netMode |= RS_NET_MODE_TRY_UPNP;
|
||||
ownState.netMode |= RS_NET_MODE_UDP;
|
||||
ownState.netMode |= RS_NET_MODE_UDP; /* set to UDP, upgraded is UPnP is Okay */
|
||||
mNetStatus = RS_NET_UPNP_INIT;
|
||||
break;
|
||||
}
|
||||
|
@ -569,16 +569,7 @@ void p3ConnectMgr::netUdpCheck()
|
|||
ownState.serveraddr = extAddr;
|
||||
mode = RS_NET_CONN_TCP_LOCAL;
|
||||
|
||||
if (mUpnpAddrValid || (ownState.netMode == RS_NET_MODE_EXT))
|
||||
{
|
||||
mode |= RS_NET_CONN_TCP_EXTERNAL;
|
||||
mode |= RS_NET_CONN_UDP_DHT_SYNC;
|
||||
}
|
||||
else if (extAddrStable)
|
||||
{
|
||||
mode |= RS_NET_CONN_UDP_DHT_SYNC;
|
||||
}
|
||||
else // if (!extAddrStable)
|
||||
if (!extAddrStable)
|
||||
{
|
||||
#ifdef CONN_DEBUG
|
||||
std::cerr << "p3ConnectMgr::netUdpCheck() UDP Unstable :( ";
|
||||
|
@ -616,6 +607,15 @@ void p3ConnectMgr::netUdpCheck()
|
|||
}
|
||||
|
||||
}
|
||||
else if (mUpnpAddrValid || (ownState.netMode & RS_NET_MODE_EXT))
|
||||
{
|
||||
mode |= RS_NET_CONN_TCP_EXTERNAL;
|
||||
mode |= RS_NET_CONN_UDP_DHT_SYNC;
|
||||
}
|
||||
else // if (extAddrStable)
|
||||
{
|
||||
mode |= RS_NET_CONN_UDP_DHT_SYNC;
|
||||
}
|
||||
|
||||
IndicateConfigChanged(); /**** INDICATE MSG CONFIG CHANGED! *****/
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue