Merge pull request #2441 from jpk68/libi2pd-typos

libi2pd: fix some typos
This commit is contained in:
orignal
2026-07-24 22:10:23 -04:00
committed by GitHub
14 changed files with 24 additions and 24 deletions
+2 -2
View File
@@ -292,7 +292,7 @@ namespace config {
options_description addressbook("AddressBook options");
addressbook.add_options()
("addressbook.enabled", value<bool>()->default_value(true), "Enable address book lookups and subscritions (default: enabled)")
("addressbook.enabled", value<bool>()->default_value(true), "Enable address book lookups and subscriptions (default: enabled)")
("addressbook.defaulturl", value<std::string>()->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<std::string>()->default_value(""), "OpenbSD file with pledge rules")
("openbsd.pledge_file", value<std::string>()->default_value(""), "OpenBSD file with pledge rules")
("openbsd.unevil_file", value<std::string>()->default_value(""), "OpenBSD file with unevil rules")
("openbsd.unevil_enabled", value<bool>()->default_value(true), "use unevil rues")
("openbsd.pledge_enabled", value<bool>()->default_value(true), "use pledge rules")
+2 -2
View File
@@ -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);
}
+2 -2
View File
@@ -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));
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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:
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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;
}
+2 -2
View File
@@ -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 ())
+2 -2
View File
@@ -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
+3 -3
View File
@@ -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)
+1 -1
View File
@@ -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);
}