change timer and fix log messages

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1780 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
joss17 2009-10-30 00:44:44 +00:00
parent 4295eee208
commit 62111d00ca
3 changed files with 11 additions and 11 deletions

View File

@ -42,10 +42,10 @@ const int p3connectzone = 3431;
const uint32_t RS_NET_NEED_RESET = 0x0000;
const uint32_t RS_NET_UNKNOWN = 0x0001;
const uint32_t RS_NET_UPNP_INIT = 0x0002;
const uint32_t RS_NET_UPNP_SETUP = 0x0003;
const uint32_t RS_NET_DONE = 0x0004;
const uint32_t RS_NET_LOOPBACK = 0x0005;
const uint32_t RS_NET_MODE_DOWN = 0x0006;
const uint32_t RS_NET_UPNP_SETUP = 0x0004;
const uint32_t RS_NET_DONE = 0x0005;
const uint32_t RS_NET_LOOPBACK = 0x0006;
const uint32_t RS_NET_MODE_DOWN = 0x0007;
/* Stun modes (TODO) */
const uint32_t RS_STUN_DHT = 0x0001;
@ -53,8 +53,8 @@ const uint32_t RS_STUN_DONE = 0x0002;
const uint32_t RS_STUN_LIST_MIN = 100;
const uint32_t RS_STUN_FOUND_MIN = 10;
const uint32_t MAX_UPNP_INIT = 60; /* seconds UPnP timeout */
const uint32_t MAX_NETWORK_INIT = 75; /* timeout before network reset */
const uint32_t MAX_UPNP_INIT = 70; /* seconds UPnP timeout */
const uint32_t MAX_NETWORK_INIT = 80; /* timeout before network reset */
const uint32_t MIN_TIME_BETWEEN_NET_RESET = 5;
@ -952,9 +952,9 @@ bool p3ConnectMgr::stunCheck()
RsStackMutex stack(connMtx); /****** STACK LOCK MUTEX *******/
#ifdef CONN_DEBUG
std::cerr << "mStunExtAddr.sin_addr.s_addr : " << inet_ntoa(mStunExtAddr.sin_addr) << std::endl;
std::cerr << "raddr.sin_addr.s_addr : " << inet_ntoa(raddr.sin_addr) << std::endl;
std::cerr << "stable : " << stable << std::endl;
std::cerr << "p3ConnectMgr::stunCheck() mStunExtAddr.sin_addr.s_addr : " << inet_ntoa(mStunExtAddr.sin_addr) << std::endl;
std::cerr << "p3ConnectMgr::stunCheck() raddr.sin_addr.s_addr : " << inet_ntoa(raddr.sin_addr) << std::endl;
std::cerr << "p3ConnectMgr::stunCheck() stable : " << (stable !=0) << std::endl;
#endif
if ((mStunExtAddr.sin_addr.s_addr != raddr.sin_addr.s_addr) ||

View File

@ -263,7 +263,7 @@ ExtAddrFinder::ExtAddrFinder()
_searching = new bool ;
*_searching = false ;
*mFoundTS = time(NULL);
*mFoundTS = time(NULL) - MAX_IP_STORE;
_addr = (sockaddr_in*)malloc(sizeof(sockaddr_in)) ;

View File

@ -216,7 +216,7 @@ bool upnphandler::shutdown_upnp()
cUPnPControlPoint->DeletePortMappings(upnpPortMapping1);
#ifdef UPNP_DEBUG
std::cerr << " : Attempting To Remove Redirection: port: " << eport_curr;
std::cerr << "upnphandler::shutdown_upnp() : Attempting To Remove Redirection: port: " << eport_curr;
std::cerr << " Prot: UDP";
std::cerr << std::endl;
#endif