mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
Net, Dht and Configuration changes.
* set PortForward in NetStateBox when the Network has been setup. * add GeneralConfig to rsConfig external interface. * enabled ADVANCED configuration option. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4500 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a1e112934d
commit
31ec7a074b
7 changed files with 96 additions and 9 deletions
|
@ -105,6 +105,19 @@ void pqiNetStateBox::setAddressWebIP(bool active, struct sockaddr_in *addr)
|
|||
}
|
||||
|
||||
|
||||
void pqiNetStateBox::setPortForwarded(bool active, uint16_t port)
|
||||
{
|
||||
if ((!mPortForwardSet) || (mPortForwarded != port))
|
||||
|
||||
{
|
||||
mPortForwardSet = true;
|
||||
mPortForwarded = port;
|
||||
|
||||
mStatusOkay = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void pqiNetStateBox::setDhtState(bool on, bool active)
|
||||
{
|
||||
if ((!mDhtSet) || (mDhtActive != active) || (mDhtOn != on))
|
||||
|
@ -197,8 +210,8 @@ void pqiNetStateBox::reset()
|
|||
mWebIPActive = false;
|
||||
//struct sockaddr_in mWebIPAddr;
|
||||
|
||||
mPortForwardedSet = false;
|
||||
mPortForwarded = 0;
|
||||
mPortForwardSet = false;
|
||||
mPortForwarded = false;
|
||||
|
||||
mDhtSet = false;
|
||||
mDhtActive = false;
|
||||
|
@ -412,7 +425,7 @@ void pqiNetStateBox::determineNetworkState()
|
|||
|
||||
//mExtAddrStable = true;
|
||||
}
|
||||
else if (mPortForwardedSet)
|
||||
else if (mPortForwardSet)
|
||||
{
|
||||
mNetworkMode = RSNET_NETWORK_BEHINDNAT;
|
||||
// Use Fallback Guess.
|
||||
|
@ -476,7 +489,7 @@ void pqiNetStateBox::determineNetworkState()
|
|||
//mExtAddrStable = true;
|
||||
mNetStateMode = RSNET_NETSTATE_WARNING_NODHT;
|
||||
}
|
||||
else if (mPortForwardedSet)
|
||||
else if (mPortForwardSet)
|
||||
{
|
||||
mNetworkMode = RSNET_NETWORK_BEHINDNAT;
|
||||
mNatTypeMode = RSNET_NATTYPE_UNKNOWN;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue