mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-02-02 11:04:00 +01:00
clean code
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
650b7abef6
commit
96c4463d39
|
@ -544,7 +544,7 @@ namespace transport
|
|||
{
|
||||
onEstablished ();
|
||||
s->SendPeerTest ();
|
||||
});
|
||||
});
|
||||
else
|
||||
s->SetOnEstablished ([s]() { s->SendPeerTest (); });
|
||||
}
|
||||
|
@ -822,7 +822,7 @@ namespace transport
|
|||
if (s.second->IsEstablished () && (s.second->GetRelayTag () && s.second->IsOutgoing ()) &&
|
||||
!excluded.count (s.second->GetRemoteIdentity ()->GetIdentHash ()) &&
|
||||
((v4 && (s.second->GetRemoteTransports () & i2p::data::RouterInfo::eSSU2V4)) ||
|
||||
(!v4 && (s.second->GetRemoteTransports () & i2p::data::RouterInfo::eSSU2V6))))
|
||||
(!v4 && (s.second->GetRemoteTransports () & i2p::data::RouterInfo::eSSU2V6))))
|
||||
ret.push_back (s.second);
|
||||
}
|
||||
if ((int)ret.size () > maxNumIntroducers)
|
||||
|
|
|
@ -1612,7 +1612,7 @@ namespace transport
|
|||
if (i2p::context.GetStatusV6 () == eRouterStatusTesting)
|
||||
i2p::context.SetErrorV6 (eRouterErrorSymmetricNAT);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isV4)
|
||||
|
@ -1921,7 +1921,7 @@ namespace transport
|
|||
if (len < 3) return;
|
||||
uint8_t msg = buf[0];
|
||||
size_t offset = 3; // points to signed data
|
||||
if (msg == 2 || msg == 4) offset += 32; // hash is presented for msg 2 and 4 only
|
||||
if (msg == 2 || msg == 4) offset += 32; // hash is presented for msg 2 and 4 only
|
||||
if (len < offset + 5) return;
|
||||
uint32_t nonce = bufbe32toh (buf + offset + 1);
|
||||
switch (msg) // msg
|
||||
|
@ -2369,7 +2369,7 @@ namespace transport
|
|||
buf[8 + numRanges*2 + 1] = 255; // Acks 255
|
||||
numAcks -= 255;
|
||||
numRanges++;
|
||||
buf[8 + numRanges*2] = 0; // NACKs 0
|
||||
buf[8 + numRanges*2] = 0; // NACKs 0
|
||||
if (numRanges >= maxNumRanges) break;
|
||||
}
|
||||
if (numAcks > 255) numAcks = 255;
|
||||
|
@ -2708,7 +2708,7 @@ namespace transport
|
|||
UpdateReceivePacketNum (packet);
|
||||
}
|
||||
else
|
||||
LogPrint (eLogError, "SSU2: Out of sequence packet ", packet, " is less than last received ", m_ReceivePacketNum);
|
||||
LogPrint (eLogError, "SSU2: Out of sequence packet ", packet, " is less than last received ", m_ReceivePacketNum);
|
||||
}
|
||||
if (m_OutOfSequencePackets.size () > 255*4)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue