Fixed inconsistent code (Patch rom G10H4ck)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7821 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2015-01-05 19:37:42 +00:00
parent 4704cc122d
commit 8129d0c5d4

View File

@ -143,9 +143,9 @@ int UdpRelayReceiver::removeUdpPeer(UdpPeer *peer)
{
if (it->second == peer)
{
realPeerAddr = it->first;
mPeers.erase(it);
found = true;
realPeerAddr = it->first;
#ifdef DEBUG_UDP_RELAY
std::cerr << "UdpRelayReceiver::removeUdpPeer() removing UdpPeer" << std::endl;
@ -1036,20 +1036,17 @@ UdpRelayProxy::UdpRelayProxy()
}
UdpRelayProxy::UdpRelayProxy(UdpRelayAddrSet *addrSet, int relayClass, uint32_t bandwidth)
: mAddrs(*addrSet),
mRelayClass(relayClass),
mBandwidth(0),
mDataSize(0),
mLastBandwidthTS(0),
mLastTS(time(NULL)),
mStartTS(time(NULL)),
mBandwidthLimit(bandwidth)
{
mAddrs = *addrSet;
mRelayClass = relayClass;
mBandwidth = 0;
mDataSize = 0;
mLastBandwidthTS = 0;
mLastTS = time(NULL);
mStartTS = time(NULL);
mBandwidthLimit = bandwidth;
/* fallback */
if (mBandwidthLimit == 0)
/* bandwidth fallback */
if (bandwidth == 0)
{
switch(relayClass)
{