Bugfixes for ExclusiveProxy Mode.

* changed PeerConnectStateBox::getNetState() to calcNetState() to provide up-to-date info (internal mNetState can be stale!)
 * Added "bool addrChangeLikely" parameter to ReleaseProxyExclusiveLock() - this parameter is determined by whether we actually started a UDP connection.
 * disabled ForceRestun in UdpStunner if addrChange is unlikely.
 * Reduced Stunner Period Slow from 3 minutes to 2 minutes - exact value will only be known after real-world testing.
 * More debugging.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4458 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2011-07-17 16:24:45 +00:00
parent 181ad06e33
commit c33b415ef4
7 changed files with 73 additions and 26 deletions

View file

@ -89,7 +89,7 @@ virtual ~UdpStunner() { return; }
#endif
int grabExclusiveMode(); /* returns seconds since last send/recv */
int releaseExclusiveMode();
int releaseExclusiveMode(bool forceStun);
void setTargetStunPeriod(int32_t sec_per_stun);
@ -156,6 +156,7 @@ bool locked_checkExternalAddress();
bool mExclusiveMode; /* when this is switched on, the stunner stays silent (and extAddr is maintained) */
time_t mExclusiveModeTS;
bool mForceRestun;
};