Code simplification and suppression of a bug in handling Relay connect attempt (Patch rom G10H4ck)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7820 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-01-05 19:34:43 +00:00
parent 306d6852c2
commit 4704cc122d
2 changed files with 3 additions and 13 deletions

View File

@ -783,7 +783,7 @@ uint32_t PeerConnectStateBox::updateCb(uint32_t update)
{
case CSB_UPDATE_CONNECTED:
{
if ((mState == CSB_DIRECT_ATTEMPT) || (mState == CSB_PROXY_ATTEMPT) || (mState == CSB_PROXY_ATTEMPT))
if ((mState == CSB_DIRECT_ATTEMPT) || (mState == CSB_PROXY_ATTEMPT) || (mState == CSB_RELAY_ATTEMPT))
{
mAttemptLength = now - mStateTS;
}

View File

@ -718,20 +718,10 @@ int p3BitDht::ConnectCallback(const bdId *srcId, const bdId *proxyId, const bdId
mNetMgr->getNetworkMode(), mNetMgr->getNatHoleMode(), mNetMgr->getNatTypeMode()));
}
if (exclusivePort)
{
#ifdef DEBUG_PEERNET
std::cerr << "dhtConnectionCallback: we Require Exclusive Proxy Port for connection";
std::cerr << std::endl;
if (exclusivePort) std::cerr << "dhtConnectionCallback: we Require Exclusive Proxy Port for connection" << std::endl;
else std::cerr << "dhtConnectionCallback: Dont need Exclusive Proxy Port for connection" << std::endl;
#endif
}
else
{
#ifdef DEBUG_PEERNET
std::cerr << "dhtConnectionCallback: Dont need Exclusive Proxy Port for connection";
std::cerr << std::endl;
#endif
}
connectOk = true;
}