Browse Source

Fix typos

pull/1811/head
Dimitris Apostolou 2 years ago
parent
commit
73b9c0302b
No known key found for this signature in database
GPG Key ID: 4B5D20E938204A8A
  1. 2
      libi2pd/NTCP2.cpp
  2. 14
      libi2pd/SSU2.cpp
  3. 2
      libi2pd/SSU2Session.cpp
  4. 2
      libi2pd/SSU2Session.h
  5. 2
      libi2pd/Timestamp.h
  6. 4
      libi2pd/TunnelPool.cpp
  7. 2
      libi2pd/util.cpp
  8. 2
      libi2pd_client/UDPTunnel.cpp

2
libi2pd/NTCP2.cpp

@ -309,7 +309,7 @@ namespace transport @@ -309,7 +309,7 @@ namespace transport
KDF3Bob ();
if (i2p::crypto::AEADChaCha20Poly1305 (m_SessionConfirmedBuffer + 48, m3p2Len - 16, GetH (), 32, GetK (), nonce, m3p2Buf, m3p2Len - 16, false)) // decrypt
// caclulate new h again for KDF data
// calculate new h again for KDF data
MixHash (m_SessionConfirmedBuffer + 48, m3p2Len); // h = SHA256(h || ciphertext)
else
{

14
libi2pd/SSU2.cpp

@ -408,7 +408,7 @@ namespace transport @@ -408,7 +408,7 @@ namespace transport
return it->second;
it++;
}
// not found, try from begining
// not found, try from beginning
it = m_Sessions.begin ();
while (it != m_Sessions.end () && ind)
{
@ -654,14 +654,14 @@ namespace transport @@ -654,14 +654,14 @@ namespace transport
uint32_t relayTag = 0;
if (!address->ssu->introducers.empty ())
{
std::vector<int> indicies;
for (int i = 0; i < (int)address->ssu->introducers.size (); i++) indicies.push_back(i);
if (indicies.size () > 1)
std::shuffle (indicies.begin(), indicies.end(), std::mt19937(std::random_device()()));
std::vector<int> indices;
for (int i = 0; i < (int)address->ssu->introducers.size (); i++) indices.push_back(i);
if (indices.size () > 1)
std::shuffle (indices.begin(), indices.end(), std::mt19937(std::random_device()()));
for (auto i: indicies)
for (auto i: indices)
{
const auto& introducer = address->ssu->introducers[indicies[i]];
const auto& introducer = address->ssu->introducers[indices[i]];
if (introducer.iTag && ts < introducer.iExp)
{
r = i2p::data::netdb.FindRouter (introducer.iH);

2
libi2pd/SSU2Session.cpp

@ -103,7 +103,7 @@ namespace transport @@ -103,7 +103,7 @@ namespace transport
{
// we are Alice
if (!session || !relayTag) return false;
// find local adddress to introduce
// find local address to introduce
auto localAddress = session->FindLocalAddress ();
if (!localAddress) return false;
// create nonce

2
libi2pd/SSU2Session.h

@ -35,7 +35,7 @@ namespace transport @@ -35,7 +35,7 @@ namespace transport
const int SSU2_PEER_TEST_EXPIRATION_TIMEOUT = 60; // 60 seconds
const size_t SSU2_MAX_PACKET_SIZE = 1500;
const size_t SSU2_MIN_PACKET_SIZE = 1280;
const int SSU2_HANDSHAKE_RESEND_INTERVAL = 1000; // in millseconds
const int SSU2_HANDSHAKE_RESEND_INTERVAL = 1000; // in milliseconds
const int SSU2_RESEND_INTERVAL = 300; // in milliseconds
const int SSU2_MAX_NUM_RESENDS = 5;
const int SSU2_INCOMPLETE_MESSAGES_CLEANUP_TIMEOUT = 30; // in seconds

2
libi2pd/Timestamp.h

@ -25,7 +25,7 @@ namespace util @@ -25,7 +25,7 @@ namespace util
uint32_t GetHoursSinceEpoch ();
void GetCurrentDate (char * date); // returns date as YYYYMMDD string, 9 bytes
void GetDateString (uint64_t timestamp, char * date); // timestap is seconds since epoch, returns date as YYYYMMDD string, 9 bytes
void GetDateString (uint64_t timestamp, char * date); // timestamp is seconds since epoch, returns date as YYYYMMDD string, 9 bytes
void AdjustTimeOffset (int64_t offset); // in seconds from current
class NTPTimeSync

4
libi2pd/TunnelPool.cpp

@ -76,12 +76,12 @@ namespace tunnel @@ -76,12 +76,12 @@ namespace tunnel
if (m_NumInboundHops > size)
{
m_NumInboundHops = size;
LogPrint (eLogInfo, "Tunnels: Inbound tunnel length has beed adjusted to ", size, " for explicit peers");
LogPrint (eLogInfo, "Tunnels: Inbound tunnel length has been adjusted to ", size, " for explicit peers");
}
if (m_NumOutboundHops > size)
{
m_NumOutboundHops = size;
LogPrint (eLogInfo, "Tunnels: Outbound tunnel length has beed adjusted to ", size, " for explicit peers");
LogPrint (eLogInfo, "Tunnels: Outbound tunnel length has been adjusted to ", size, " for explicit peers");
}
m_NumInboundTunnels = 1;
m_NumOutboundTunnels = 1;

2
libi2pd/util.cpp

@ -84,7 +84,7 @@ const char *inet_ntop_xp(int af, const void *src, char *dst, socklen_t size) @@ -84,7 +84,7 @@ const char *inet_ntop_xp(int af, const void *src, char *dst, socklen_t size)
default:
return NULL;
}
/* cannot direclty use &size because of strict aliasing rules */
/* cannot directly use &size because of strict aliasing rules */
return (WSAAddressToString((struct sockaddr *)&ss, sizeof(ss), NULL, dst, &s) == 0)? dst : NULL;
}

2
libi2pd_client/UDPTunnel.cpp

@ -259,7 +259,7 @@ namespace client @@ -259,7 +259,7 @@ namespace client
void I2PUDPClientTunnel::HandleRecvFromLocal (const boost::system::error_code & ec, std::size_t transferred)
{
if (m_cancel_resolve) {
LogPrint (eLogDebug, "UDP Client: Ignoring incomming data: stopping");
LogPrint (eLogDebug, "UDP Client: Ignoring incoming data: stopping");
return;
}
if (ec) {

Loading…
Cancel
Save