From 8ee9c437e1bba63f353bd92d0a575ee84febc610 Mon Sep 17 00:00:00 2001 From: Dimitris Apostolou Date: Fri, 12 Nov 2021 18:33:51 +0200 Subject: [PATCH] Fix typos --- libi2pd/Crypto.h | 2 +- libi2pd/Garlic.cpp | 4 ++-- libi2pd/NTCP2.cpp | 4 ++-- libi2pd/NetDb.cpp | 4 ++-- libi2pd/SSUSession.cpp | 2 +- libi2pd/Streaming.cpp | 2 +- libi2pd/Streaming.h | 4 ++-- libi2pd/TunnelEndpoint.cpp | 2 +- libi2pd/TunnelEndpoint.h | 2 +- libi2pd_client/BOB.h | 2 +- libi2pd_client/I2PTunnel.cpp | 2 +- libi2pd_client/SAM.cpp | 2 +- libi2pd_wrapper/api.swigcxx | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libi2pd/Crypto.h b/libi2pd/Crypto.h index 75942905..d0ff42e4 100644 --- a/libi2pd/Crypto.h +++ b/libi2pd/Crypto.h @@ -106,7 +106,7 @@ namespace crypto BN_CTX * m_Ctx; uint8_t m_PrivateKey[32]; #endif - bool m_IsElligatorIneligible = false; // true if definitly ineligible + bool m_IsElligatorIneligible = false; // true if definitely ineligible }; // ElGamal diff --git a/libi2pd/Garlic.cpp b/libi2pd/Garlic.cpp index ea30a249..2ccd11f5 100644 --- a/libi2pd/Garlic.cpp +++ b/libi2pd/Garlic.cpp @@ -271,7 +271,7 @@ namespace garlic (*numCloves)++; } } - if (msg) // clove message ifself if presented + if (msg) // clove message itself if presented { size += CreateGarlicClove (payload + size, msg, m_Destination ? m_Destination->IsDestination () : false); (*numCloves)++; @@ -542,7 +542,7 @@ namespace garlic auto session = std::make_shared (this, false); // incoming if (!session->HandleNextMessage (buf, length, nullptr, 0)) { - // try to gererate more tags for last tagset + // try to generate more tags for last tagset if (m_LastTagset && (m_LastTagset->GetNextIndex () - m_LastTagset->GetTrimBehind () < 3*ECIESX25519_MAX_NUM_GENERATED_TAGS)) { uint64_t missingTag; memcpy (&missingTag, buf, 8); diff --git a/libi2pd/NTCP2.cpp b/libi2pd/NTCP2.cpp index e592a7f2..2497b213 100644 --- a/libi2pd/NTCP2.cpp +++ b/libi2pd/NTCP2.cpp @@ -681,7 +681,7 @@ namespace transport auto addr = ri.GetNTCP2AddressWithStaticKey (m_Establisher->m_RemoteStaticKey); if (!addr) { - LogPrint (eLogError, "NTCP2: No NTCP2 address wth static key found in SessionConfirmed"); + LogPrint (eLogError, "NTCP2: No NTCP2 address with static key found in SessionConfirmed"); Terminate (); return; } @@ -973,7 +973,7 @@ namespace transport { // allocate send buffer m_NextSendBuffer = new uint8_t[287]; // can be any size > 16, we just allocate 287 frequently - // crate padding block + // create padding block auto paddingLen = CreatePaddingBlock (totalLen, m_NextSendBuffer, 287 - 16); // and padding block to encrypt and send if (paddingLen) diff --git a/libi2pd/NetDb.cpp b/libi2pd/NetDb.cpp index 7123741a..8cb63054 100644 --- a/libi2pd/NetDb.cpp +++ b/libi2pd/NetDb.cpp @@ -1261,7 +1261,7 @@ namespace data return it->second; it++; } - // still not found, try from the begining + // still not found, try from the beginning it = m_RouterInfos.begin (); while (it != it1 && it != m_RouterInfos.end ()) { @@ -1269,7 +1269,7 @@ namespace data return it->second; it++; } - // still not found, try to the begining + // still not found, try to the beginning it = it2; while (it != m_RouterInfos.end ()) { diff --git a/libi2pd/SSUSession.cpp b/libi2pd/SSUSession.cpp index b28f324b..14f5eca4 100644 --- a/libi2pd/SSUSession.cpp +++ b/libi2pd/SSUSession.cpp @@ -1020,7 +1020,7 @@ namespace transport void SSUSession::ProcessPeerTest (const uint8_t * buf, size_t len, const boost::asio::ip::udp::endpoint& senderEndpoint) { uint32_t nonce = bufbe32toh (buf); // 4 bytes - boost::asio::ip::address addr; // Alice's addresss + boost::asio::ip::address addr; // Alice's address uint16_t port = 0; // and port auto size = ExtractIPAddressAndPort (buf + 4, len - 4, addr, port); if (port && (size != 7) && (size != 19)) diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index 8be6811b..df7a7eed 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -102,7 +102,7 @@ namespace stream LogPrint (eLogDebug, "Streaming: Stream deleted"); } - void Stream::Terminate (bool deleteFromDestination) // shoudl be called from StreamingDestination::Stop only + void Stream::Terminate (bool deleteFromDestination) // should be called from StreamingDestination::Stop only { m_Status = eStreamStatusTerminated; m_AckSendTimer.cancel (); diff --git a/libi2pd/Streaming.h b/libi2pd/Streaming.h index c13dcab1..7e279623 100644 --- a/libi2pd/Streaming.h +++ b/libi2pd/Streaming.h @@ -111,7 +111,7 @@ namespace stream buf = new uint8_t[len]; memcpy (buf, b, len); } - SendBuffer (size_t l): // creat empty buffer + SendBuffer (size_t l): // create empty buffer len(l), offset (0) { buf = new uint8_t[len]; @@ -366,7 +366,7 @@ namespace stream handler (boost::asio::error::make_error_code (boost::asio::error::timed_out), received); else { - // itermediate iterrupt + // itermediate interrupt SendUpdatedLeaseSet (); // send our leaseset if applicable AsyncReceive (buffer, handler, remainingTimeout); } diff --git a/libi2pd/TunnelEndpoint.cpp b/libi2pd/TunnelEndpoint.cpp index 4885c090..784185c3 100644 --- a/libi2pd/TunnelEndpoint.cpp +++ b/libi2pd/TunnelEndpoint.cpp @@ -30,7 +30,7 @@ namespace tunnel m_NumReceivedBytes += TUNNEL_DATA_MSG_SIZE; uint8_t * decrypted = msg->GetPayload () + 20; // 4 + 16 - uint8_t * zero = (uint8_t *)memchr (decrypted + 4, 0, TUNNEL_DATA_ENCRYPTED_SIZE - 4); // witout 4-byte checksum + uint8_t * zero = (uint8_t *)memchr (decrypted + 4, 0, TUNNEL_DATA_ENCRYPTED_SIZE - 4); // without 4-byte checksum if (zero) { uint8_t * fragment = zero + 1; diff --git a/libi2pd/TunnelEndpoint.h b/libi2pd/TunnelEndpoint.h index e5a6bbc8..f95eac70 100644 --- a/libi2pd/TunnelEndpoint.h +++ b/libi2pd/TunnelEndpoint.h @@ -49,7 +49,7 @@ namespace tunnel void HandleFollowOnFragment (uint32_t msgID, bool isLastFragment, uint8_t fragmentNum, const uint8_t * fragment, size_t size); bool ConcatFollowOnFragment (TunnelMessageBlockEx& msg, const uint8_t * fragment, size_t size) const; // true if success - void HandleCurrenMessageFollowOnFragment (const uint8_t * frgament, size_t size, bool isLastFragment); + void HandleCurrenMessageFollowOnFragment (const uint8_t * fragment, size_t size, bool isLastFragment); void HandleNextMessage (const TunnelMessageBlock& msg); void AddOutOfSequenceFragment (uint32_t msgID, uint8_t fragmentNum, bool isLastFragment, const uint8_t * fragment, size_t size); diff --git a/libi2pd_client/BOB.h b/libi2pd_client/BOB.h index f5f0c8ee..164ca47c 100644 --- a/libi2pd_client/BOB.h +++ b/libi2pd_client/BOB.h @@ -63,7 +63,7 @@ namespace client const char BOB_HELP_OUTPORT[] = "outport - Set the outbound port that nickname contacts."; const char BOB_HELP_INHOST[] = "inhost - Set the inbound hostname or IP."; const char BOB_HELP_INPORT[] = "inport - Set the inbound port number nickname listens on."; - const char BOB_HELP_QUIET[] = "quiet - Wether to send the incoming destination."; + const char BOB_HELP_QUIET[] = "quiet - Whether to send the incoming destination."; const char BOB_HELP_LOOKUP[] = "lookup - Look up an I2P hostname."; const char BOB_HELP_CLEAR[] = "clear - Clear the current nickname out of the list."; const char BOB_HELP_LIST[] = "list - List all tunnels."; diff --git a/libi2pd_client/I2PTunnel.cpp b/libi2pd_client/I2PTunnel.cpp index b97270e4..838e80bc 100644 --- a/libi2pd_client/I2PTunnel.cpp +++ b/libi2pd_client/I2PTunnel.cpp @@ -205,7 +205,7 @@ namespace client } else // closed by peer { - // get remaning data + // get remaining data auto len = m_Stream->ReadSome (m_StreamBuffer, I2P_TUNNEL_CONNECTION_BUFFER_SIZE); if (len > 0) // still some data Write (m_StreamBuffer, len); diff --git a/libi2pd_client/SAM.cpp b/libi2pd_client/SAM.cpp index c2983f43..d00a9e50 100644 --- a/libi2pd_client/SAM.cpp +++ b/libi2pd_client/SAM.cpp @@ -936,7 +936,7 @@ namespace client else // closed by peer { uint8_t * buff = new uint8_t[SAM_SOCKET_BUFFER_SIZE]; - // get remaning data + // get remaining data auto len = m_Stream->ReadSome (buff, SAM_SOCKET_BUFFER_SIZE); if (len > 0) // still some data { diff --git a/libi2pd_wrapper/api.swigcxx b/libi2pd_wrapper/api.swigcxx index 3ef6bd36..e1d18eef 100644 --- a/libi2pd_wrapper/api.swigcxx +++ b/libi2pd_wrapper/api.swigcxx @@ -1,4 +1,4 @@ -// See swig.org for more inteface options, +// See swig.org for more interface options, // e.g. map std::string to Go string %{