Attempted fix for maintaining External Port in Manual Forwarded Mode.

- added check for RS_NET_MODE_EXT instead of RS_NET_MODE_TRY_EXT... as trys aren't used in p3PeerMgr.
 - removed tryMode from external interface - as this data is not available anymore.
 - Removed setting this parameter in p3peers.cc



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4919 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-02-11 12:18:56 +00:00
parent fd83e5950f
commit 57c7e66a38
3 changed files with 12 additions and 16 deletions

View File

@ -744,7 +744,18 @@ bool p3PeerMgrIMPL::UpdateOwnAddress(const struct sockaddr_in &localAddr, const
* This should keep people happy, and allow for misconfiguration!
*/
if (mOwnState.netMode & RS_NET_MODE_TRY_EXT)
if (mOwnState.netMode & RS_NET_MODE_TRY_EXT)
{
/**** THIS CASE SHOULD NOT BE TRIGGERED ****/
std::cerr << "p3PeerMgrIMPL::UpdateOwnAddress() Disabling Update of Server Port ";
std::cerr << " as MANUAL FORWARD Mode (ERROR - SHOULD NOT BE TRIGGERED: TRY_EXT_MODE)";
std::cerr << std::endl;
std::cerr << "Address is Now: ";
std::cerr << rs_inet_ntoa(mOwnState.serveraddr.sin_addr);
std::cerr << ":" << htons(mOwnState.serveraddr.sin_port);
std::cerr << std::endl;
}
else if (mOwnState.netMode & RS_NET_MODE_EXT)
{
mOwnState.serveraddr.sin_addr.s_addr = extAddr.sin_addr.s_addr;
std::cerr << "p3PeerMgrIMPL::UpdateOwnAddress() Disabling Update of Server Port ";

View File

@ -175,7 +175,6 @@ class RsPeerDetails
std::list<std::string> ipAddressList;
uint32_t netMode;
uint32_t tryNetMode; /* only for ownState */
uint32_t visState;
/* basic stats */

View File

@ -340,20 +340,6 @@ bool p3Peers::getPeerDetails(const std::string &id, RsPeerDetails &d)
break;
}
if (ps.netMode & RS_NET_MODE_TRY_EXT)
{
d.tryNetMode = RS_NETMODE_EXT;
}
else if (ps.netMode & RS_NET_MODE_TRY_UPNP)
{
d.tryNetMode = RS_NETMODE_UPNP;
}
else
{
d.tryNetMode = RS_NETMODE_UDP;
}
d.visState = 0;
if (!(ps.visState & RS_VIS_STATE_NODISC))
{