mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 08:29:26 -05:00
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:
parent
4704cc122d
commit
8129d0c5d4
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user