Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 committed Nov 13, 2021
1 parent 4052b1e commit 8ee9c43
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion libi2pd/Crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions libi2pd/Garlic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)++;
Expand Down Expand Up @@ -542,7 +542,7 @@ namespace garlic
auto session = std::make_shared<ECIESX25519AEADRatchetSession> (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);
Expand Down
4 changes: 2 additions & 2 deletions libi2pd/NTCP2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions libi2pd/NetDb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1261,15 +1261,15 @@ 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 ())
{
if (!it->second->IsUnreachable () && filter (it->second))
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 ())
{
Expand Down
2 changes: 1 addition & 1 deletion libi2pd/SSUSession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
2 changes: 1 addition & 1 deletion libi2pd/Streaming.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ();
Expand Down
4 changes: 2 additions & 2 deletions libi2pd/Streaming.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion libi2pd/TunnelEndpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libi2pd/TunnelEndpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion libi2pd_client/BOB.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace client
const char BOB_HELP_OUTPORT[] = "outport <PORT_NUMBER> - Set the outbound port that nickname contacts.";
const char BOB_HELP_INHOST[] = "inhost <HOSTNAME|IP> - Set the inbound hostname or IP.";
const char BOB_HELP_INPORT[] = "inport <PORT_NUMBER> - Set the inbound port number nickname listens on.";
const char BOB_HELP_QUIET[] = "quiet <True|False> - Wether to send the incoming destination.";
const char BOB_HELP_QUIET[] = "quiet <True|False> - Whether to send the incoming destination.";
const char BOB_HELP_LOOKUP[] = "lookup <I2P_HOSTNAME> - 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.";
Expand Down
2 changes: 1 addition & 1 deletion libi2pd_client/I2PTunnel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion libi2pd_client/SAM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion libi2pd_wrapper/api.swigcxx
Original file line number Diff line number Diff line change
@@ -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

%{
Expand Down

0 comments on commit 8ee9c43

Please sign in to comment.