From b02c160b843fe1869eda0712c5a2f8caa783106e Mon Sep 17 00:00:00 2001 From: jpk68 Date: Fri, 24 Jul 2026 20:45:35 -0400 Subject: [PATCH] libi2pd: fix some typos --- libi2pd/Config.cpp | 4 ++-- libi2pd/CryptoKey.cpp | 4 ++-- libi2pd/Destination.cpp | 4 ++-- libi2pd/ECIESX25519AEADRatchetSession.cpp | 2 +- libi2pd/ECIESX25519AEADRatchetSession.h | 4 ++-- libi2pd/Garlic.cpp | 2 +- libi2pd/I2PEndian.h | 2 +- libi2pd/LeaseSet.cpp | 2 +- libi2pd/NTCP2.h | 6 +++--- libi2pd/RouterInfo.cpp | 2 +- libi2pd/SSU2.cpp | 4 ++-- libi2pd/SSU2Session.cpp | 4 ++-- libi2pd/Streaming.cpp | 6 +++--- libi2pd/Streaming.h | 2 +- 14 files changed, 24 insertions(+), 24 deletions(-) diff --git a/libi2pd/Config.cpp b/libi2pd/Config.cpp index fe406b13..51b484dd 100644 --- a/libi2pd/Config.cpp +++ b/libi2pd/Config.cpp @@ -292,7 +292,7 @@ namespace config { options_description addressbook("AddressBook options"); addressbook.add_options() - ("addressbook.enabled", value()->default_value(true), "Enable address book lookups and subscritions (default: enabled)") + ("addressbook.enabled", value()->default_value(true), "Enable address book lookups and subscriptions (default: enabled)") ("addressbook.defaulturl", value()->default_value( "http://shx5vqsw7usdaunyzr2qmes2fq37oumybpudrd4jjj4e4vk4uusa.b32.i2p/hosts.txt" ), "AddressBook subscription URL for initial setup") @@ -399,7 +399,7 @@ namespace config { #ifdef __OpenBSD__ options_description openbsd_specific("OpenBSD specific options"); openbsd_specific.add_options() - ("openbsd.pledge_file", value()->default_value(""), "OpenbSD file with pledge rules") + ("openbsd.pledge_file", value()->default_value(""), "OpenBSD file with pledge rules") ("openbsd.unevil_file", value()->default_value(""), "OpenBSD file with unevil rules") ("openbsd.unevil_enabled", value()->default_value(true), "use unevil rues") ("openbsd.pledge_enabled", value()->default_value(true), "use pledge rules") diff --git a/libi2pd/CryptoKey.cpp b/libi2pd/CryptoKey.cpp index 1a448ed1..eba552fc 100644 --- a/libi2pd/CryptoKey.cpp +++ b/libi2pd/CryptoKey.cpp @@ -42,7 +42,7 @@ namespace crypto BIGNUM * x = BN_bin2bn (pub, 32, nullptr); BIGNUM * y = BN_bin2bn (pub + 32, 32, nullptr); if (!EC_POINT_set_affine_coordinates (m_Curve, m_PublicKey, x, y, nullptr)) - LogPrint (eLogError, "ECICS P256 invalid public key"); + LogPrint (eLogError, "ECIES P256 invalid public key"); BN_free (x); BN_free (y); } @@ -103,7 +103,7 @@ namespace crypto BIGNUM * x = BN_bin2bn (pub, 32, nullptr); BIGNUM * y = BN_bin2bn (pub + 32, 32, nullptr); if (!EC_POINT_set_affine_coordinates (curve->GetGroup (), m_PublicKey, x, y, nullptr)) - LogPrint (eLogError, "ECICS GOST R 34.10 invalid public key"); + LogPrint (eLogError, "ECIES GOST R 34.10 invalid public key"); BN_free (x); BN_free (y); } diff --git a/libi2pd/Destination.cpp b/libi2pd/Destination.cpp index 2373659d..e0740b58 100644 --- a/libi2pd/Destination.cpp +++ b/libi2pd/Destination.cpp @@ -682,7 +682,7 @@ namespace client m_ExcludedFloodfills.clear (); m_PublishReplyToken = 1; // dummy non-zero value // try again after a while - LogPrint (eLogInfo, "Destination: Can't publish LeasetSet because destination is not ready. Try publishing again after ", PUBLISH_CONFIRMATION_TIMEOUT, " milliseconds"); + LogPrint (eLogInfo, "Destination: Can't publish LeaseSet because destination is not ready. Try publishing again after ", PUBLISH_CONFIRMATION_TIMEOUT, " milliseconds"); m_PublishConfirmationTimer.expires_after (std::chrono::milliseconds(PUBLISH_CONFIRMATION_TIMEOUT)); m_PublishConfirmationTimer.async_wait (std::bind (&LeaseSetDestination::HandlePublishConfirmationTimer, shared_from_this (), std::placeholders::_1, PUBLISH_CONFIRMATION_TIMEOUT)); @@ -745,7 +745,7 @@ namespace client { if (*ls == *leaseSet) { - // we got latest LeasetSet + // we got latest LeaseSet LogPrint (eLogDebug, "Destination: Published LeaseSet verified for ", s->GetIdentHash().ToBase32()); s->m_PublishVerificationTimer.expires_after (std::chrono::seconds(PUBLISH_REGULAR_VERIFICATION_INTERNAL)); s->m_PublishVerificationTimer.async_wait (std::bind (&LeaseSetDestination::HandlePublishVerificationTimer, s, std::placeholders::_1)); diff --git a/libi2pd/ECIESX25519AEADRatchetSession.cpp b/libi2pd/ECIESX25519AEADRatchetSession.cpp index 2c4a1474..801a7cf3 100644 --- a/libi2pd/ECIESX25519AEADRatchetSession.cpp +++ b/libi2pd/ECIESX25519AEADRatchetSession.cpp @@ -1316,7 +1316,7 @@ namespace garlic { if (!ls || ls->GetStoreType () != i2p::data::NETDB_STORE_TYPE_STANDARD_LEASESET2) { - LogPrint (eLogError, "Garlic: Incorrect LeasetSet type to send"); + LogPrint (eLogError, "Garlic: Incorrect LeaseSet type to send"); return 0; } uint16_t cloveSize = 1 + 9 + DATABASE_STORE_HEADER_SIZE + ls->GetBufferLen (); // to local diff --git a/libi2pd/ECIESX25519AEADRatchetSession.h b/libi2pd/ECIESX25519AEADRatchetSession.h index 108a2221..3edf9c9f 100644 --- a/libi2pd/ECIESX25519AEADRatchetSession.h +++ b/libi2pd/ECIESX25519AEADRatchetSession.h @@ -29,7 +29,7 @@ namespace garlic { const int ECIESX25519_RESTART_TIMEOUT = 120; // number of second since session creation we can restart session after const int ECIESX25519_INACTIVITY_TIMEOUT = 90; // number of seconds we receive nothing and should restart if we can - const int ECIESX25519_SEND_INACTIVITY_TIMEOUT = 5000; // number of milliseconds we can send empty(pyaload only) packet after + const int ECIESX25519_SEND_INACTIVITY_TIMEOUT = 5000; // number of milliseconds we can send empty(payload only) packet after const int ECIESX25519_SEND_EXPIRATION_TIMEOUT = 480; // in seconds const int ECIESX25519_RECEIVE_EXPIRATION_TIMEOUT = 600; // in seconds const int ECIESX25519_SESSION_CREATE_TIMEOUT = 3; // in seconds, NSR must be send after NS received @@ -194,7 +194,7 @@ namespace garlic bool IsTerminated () const override { return m_IsTerminated; } uint64_t GetLastActivityTimestamp () const override { return m_LastActivityTimestamp; }; void SetAckRequestInterval (int interval) override { m_AckRequestInterval = interval; }; - bool CleanupUnconfirmedTags () override; // return true if unaswered Ack requests, called from I2CP + bool CleanupUnconfirmedTags () override; // return true if unanswered Ack requests, called from I2CP protected: diff --git a/libi2pd/Garlic.cpp b/libi2pd/Garlic.cpp index 295bf69a..5cab3b6d 100644 --- a/libi2pd/Garlic.cpp +++ b/libi2pd/Garlic.cpp @@ -241,7 +241,7 @@ namespace garlic SetSharedRoutingPath (nullptr); // invalidate path since leaseset was not confirmed } - // attach DeviveryStatus if necessary + // attach DeliveryStatus if necessary if (newTags || GetLeaseSetUpdateStatus () == eLeaseSetUpdated) // new tags created or leaseset updated { // clove is DeliveryStatus diff --git a/libi2pd/I2PEndian.h b/libi2pd/I2PEndian.h index 681a4999..0edec359 100644 --- a/libi2pd/I2PEndian.h +++ b/libi2pd/I2PEndian.h @@ -80,7 +80,7 @@ uint16_t be16toh(uint16_t big16); uint32_t be32toh(uint32_t big32); uint64_t be64toh(uint64_t big64); -// assume LittleEndine +// assume LittleEndian #define htole16 #define htole32 #define htole64 diff --git a/libi2pd/LeaseSet.cpp b/libi2pd/LeaseSet.cpp index 9c868657..6b5250b6 100644 --- a/libi2pd/LeaseSet.cpp +++ b/libi2pd/LeaseSet.cpp @@ -964,7 +964,7 @@ namespace data { // no tunnels or withdraw SetExpirationTime (publishedTimestamp*1000LL); - memset (expiresBuf, 0, 2); // expires immeditely + memset (expiresBuf, 0, 2); // expires immediately } // sign keys.Sign (m_Buffer, offset, m_Buffer + offset); // LS + leading store type diff --git a/libi2pd/NTCP2.h b/libi2pd/NTCP2.h index ffd23b24..a858408c 100644 --- a/libi2pd/NTCP2.h +++ b/libi2pd/NTCP2.h @@ -32,7 +32,7 @@ namespace transport constexpr size_t NTCP2_UNENCRYPTED_FRAME_MAX_SIZE = 65519; constexpr size_t NTCP2_SEND_AFTER_FRAME_SIZE = 16386; // send frame when exceeds this size - constexpr size_t NTCP2_SESSION_HANDSHAKE_MAX_SIZE = 287; // SessionRequest/SesionCreated without ML-KEM frame + constexpr size_t NTCP2_SESSION_HANDSHAKE_MAX_SIZE = 287; // SessionRequest/SessionCreated without ML-KEM frame constexpr size_t NTCP2_SESSION_HANDSHAKE_LONG_MAX_SIZE = 944; // for non-PQ const int NTCP2_MAX_PADDING_RATIO = 6; // in % @@ -43,8 +43,8 @@ namespace transport const int NTCP2_TERMINATION_CHECK_TIMEOUT = 28; // 28 seconds const int NTCP2_TERMINATION_CHECK_TIMEOUT_VARIANCE = 5; // 5 seconds const int NTCP2_RECEIVE_BUFFER_DELETION_TIMEOUT = 3; // 3 seconds - const int NTCP2_ROUTERINFO_RESEND_INTERVAL = 25*60; // 25 minuntes in seconds - const int NTCP2_ROUTERINFO_RESEND_INTERVAL_VARIANCE = 25*60; // 25 minuntes + const int NTCP2_ROUTERINFO_RESEND_INTERVAL = 25*60; // 25 minutes in seconds + const int NTCP2_ROUTERINFO_RESEND_INTERVAL_VARIANCE = 25*60; // 25 minutes const int NTCP2_CLOCK_SKEW = 60; // in seconds const int NTCP2_MAX_OUTGOING_QUEUE_SIZE = 500; // how many messages we can queue up diff --git a/libi2pd/RouterInfo.cpp b/libi2pd/RouterInfo.cpp index f3c9aea3..0665b2fd 100644 --- a/libi2pd/RouterInfo.cpp +++ b/libi2pd/RouterInfo.cpp @@ -1210,7 +1210,7 @@ namespace data { auto addr1 = (*addresses1)[i], addr2 = (*addresses2)[i]; if (addr1 && addr2 && !addr1->host.is_unspecified () && !addr2->host.is_unspecified ()) - return addr1->IsSameSubnet (*addr2); // first adddess with IPs + return addr1->IsSameSubnet (*addr2); // first address with IPs } return false; } diff --git a/libi2pd/SSU2.cpp b/libi2pd/SSU2.cpp index 509ff32b..0b8eee6c 100644 --- a/libi2pd/SSU2.cpp +++ b/libi2pd/SSU2.cpp @@ -744,7 +744,7 @@ namespace transport m_LastSession->ProcessFirstIncomingMessage (connID, buf, len); // SessionRequest break; case eSSU2SessionStateClosing: - m_LastSession->ProcessData (buf, len, senderEndpoint); // we might receive termintaion block + m_LastSession->ProcessData (buf, len, senderEndpoint); // we might receive termination block if (m_LastSession && m_LastSession->GetState () == eSSU2SessionStateClosing) m_LastSession->RequestTermination (eSSU2TerminationReasonIdleTimeout); // send termination again break; @@ -996,7 +996,7 @@ namespace transport break; else { - // address is invalid or not intrudcer, try another SSU2 address if exists + // address is invalid or not introducer, try another SSU2 address if exists if (address->IsV4 ()) { if (i2p::context.SupportsV6 ()) diff --git a/libi2pd/SSU2Session.cpp b/libi2pd/SSU2Session.cpp index e10d5a20..71059f12 100644 --- a/libi2pd/SSU2Session.cpp +++ b/libi2pd/SSU2Session.cpp @@ -2598,7 +2598,7 @@ namespace transport else code = eSSU2PeerTestCodeCharlieSignatureFailure; } - else // maformed message + else // malformed message code = eSSU2PeerTestCodeCharlieReasonUnspecified; } else @@ -2683,7 +2683,7 @@ namespace transport { if (!session->IsConnectedRecently ()) SetRouterStatus (eRouterStatusOK); - // send msg 6 immeditely + // send msg 6 immediately session->SendPeerTest (6, buf + offset, len - offset, addr); } else diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index a3d90c19..b20b13d7 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -932,7 +932,7 @@ namespace stream } if (!done) { - // make sure that AsycReceive complete + // make sure that AsyncReceive complete auto s = shared_from_this(); boost::asio::post (m_Service, [s]() { @@ -976,7 +976,7 @@ namespace stream void Stream::SendBuffer () { - if (m_RemoteLeaseSet) // don't scheudle send for first SYN for incoming stream + if (m_RemoteLeaseSet) // don't schedule send for first SYN for incoming stream ScheduleSend (); auto ts = i2p::util::GetMillisecondsSinceEpoch (); int numMsgs = m_WindowSize - m_SentPackets.size (); @@ -2484,7 +2484,7 @@ namespace stream size_t size; auto msg = (len <= STREAMING_MTU_RATCHETS) ? m_I2NPMsgsPool.AcquireShared () : NewI2NPMessage (); uint8_t * buf = msg->GetPayload (); - buf += 4; // reserve for lengthlength + buf += 4; // reserve for length msg->len += 4; if (m_Gzip || gzip) diff --git a/libi2pd/Streaming.h b/libi2pd/Streaming.h index 9a91ac14..10e1f8f8 100644 --- a/libi2pd/Streaming.h +++ b/libi2pd/Streaming.h @@ -434,7 +434,7 @@ namespace stream handler (boost::asio::error::make_error_code (boost::asio::error::timed_out), received); else { - // itermediate interrupt + // intermediate interrupt SendUpdatedLeaseSet (); // send our leaseset if applicable AsyncReceive (buffer, handler, remainingTimeout); }