diff --git a/daemon/Daemon.cpp b/daemon/Daemon.cpp index 8e0804d1..b693ec52 100644 --- a/daemon/Daemon.cpp +++ b/daemon/Daemon.cpp @@ -256,7 +256,7 @@ namespace i2p pos = comma + 1; } while (comma != std::string::npos); - LogPrint(eLogInfo, "Daemon: setting restricted routes to use ", idents.size(), " trusted routesrs"); + LogPrint(eLogInfo, "Daemon: setting restricted routes to use ", idents.size(), " trusted routers"); i2p::transport::transports.RestrictRoutesToRouters(idents); restricted = idents.size() > 0; } diff --git a/libi2pd/Config.cpp b/libi2pd/Config.cpp index 22b08e10..fe25eb09 100644 --- a/libi2pd/Config.cpp +++ b/libi2pd/Config.cpp @@ -73,7 +73,7 @@ namespace config { ("limits.coresize", value()->default_value(0), "Maximum size of corefile in Kb (0 - use system limit)") ("limits.openfiles", value()->default_value(0), "Maximum number of open files (0 - use system default)") ("limits.transittunnels", value()->default_value(2500), "Maximum active transit sessions (default:2500)") - ("limits.ntcpsoft", value()->default_value(0), "Threshold to start probabalistic backoff with ntcp sessions (default: use system limit)") + ("limits.ntcpsoft", value()->default_value(0), "Threshold to start probabilistic backoff with ntcp sessions (default: use system limit)") ("limits.ntcphard", value()->default_value(0), "Maximum number of ntcp sessions (default: use system limit)") ("limits.ntcpthreads", value()->default_value(1), "Maximum number of threads used by NTCP DH worker (default: 1)") ; @@ -153,8 +153,8 @@ namespace config { ("i2pcontrol.address", value()->default_value("127.0.0.1"), "I2PCP listen address") ("i2pcontrol.port", value()->default_value(7650), "I2PCP listen port") ("i2pcontrol.password", value()->default_value("itoopie"), "I2PCP access password") - ("i2pcontrol.cert", value()->default_value("i2pcontrol.crt.pem"), "I2PCP connection cerificate") - ("i2pcontrol.key", value()->default_value("i2pcontrol.key.pem"), "I2PCP connection cerificate key") + ("i2pcontrol.cert", value()->default_value("i2pcontrol.crt.pem"), "I2PCP connection certificate") + ("i2pcontrol.key", value()->default_value("i2pcontrol.key.pem"), "I2PCP connection certificate key") ; bool upnp_default = false; @@ -164,7 +164,7 @@ namespace config { options_description upnp("UPnP options"); upnp.add_options() ("upnp.enabled", value()->default_value(upnp_default), "Enable or disable UPnP: automatic port forwarding") - ("upnp.name", value()->default_value("I2Pd"), "Name i2pd appears in UPnP forwardings list") + ("upnp.name", value()->default_value("I2Pd"), "Name i2pd appears in UPnP forwarding list") ; options_description precomputation("Precomputation options"); @@ -256,7 +256,7 @@ namespace config { options_description persist("Network information persisting options"); persist.add_options() ("persist.profiles", value()->default_value(true), "Persist peer profiles (default: true)") - ("persist.addressbook", value()->default_value(true), "Persist full addreses (default: true)") + ("persist.addressbook", value()->default_value(true), "Persist full addresses (default: true)") ; m_OptionsDesc diff --git a/libi2pd/Config.h b/libi2pd/Config.h index 0bbcd5b1..679ae3bb 100644 --- a/libi2pd/Config.h +++ b/libi2pd/Config.h @@ -32,12 +32,12 @@ namespace config { * @param argc Cmdline arguments count, should be passed from main(). * @param argv Cmdline parameters array, should be passed from main() * - * If --help is given in parameters, shows it's list with description - * terminates the program with exitcode 0. + * If --help is given in parameters, shows its list with description + * and terminates the program with exitcode 0. * * In case of parameter misuse boost throws an exception. * We internally handle type boost::program_options::unknown_option, - * and then terminate program with exitcode 1. + * and then terminate the program with exitcode 1. * * Other exceptions will be passed to higher level. */ @@ -107,7 +107,7 @@ namespace config { /** * @brief Check is value explicitly given or default * @param name Name of checked parameter - * @return true if value set to default, false othervise + * @return true if value set to default, false otherwise */ bool IsDefault(const char *name); } diff --git a/libi2pd/Destination.cpp b/libi2pd/Destination.cpp index 954373f6..5ef51176 100644 --- a/libi2pd/Destination.cpp +++ b/libi2pd/Destination.cpp @@ -577,7 +577,7 @@ namespace client else { LogPrint (eLogWarning, "Destination: Publish confirmation was not received in ", PUBLISH_CONFIRMATION_TIMEOUT, " seconds from Java floodfill for crypto type ", (int)GetIdentity ()->GetCryptoKeyType ()); - // Java floodfill never sends confirmantion back for unknown crypto type + // Java floodfill never sends confirmation back for unknown crypto type // assume it successive and try to verify m_PublishVerificationTimer.expires_from_now (boost::posix_time::seconds(PUBLISH_VERIFICATION_TIMEOUT)); m_PublishVerificationTimer.async_wait (std::bind (&LeaseSetDestination::HandlePublishVerificationTimer, diff --git a/libi2pd/FS.h b/libi2pd/FS.h index 87364fea..6f112218 100644 --- a/libi2pd/FS.h +++ b/libi2pd/FS.h @@ -66,7 +66,7 @@ namespace fs { /** @brief Returns current application name, default 'i2pd' */ const std::string & GetAppName (); - /** @brief Set applicaton name, affects autodetection of datadir */ + /** @brief Set application name, affects autodetection of datadir */ void SetAppName (const std::string& name); /** @brief Returns datadir path */ diff --git a/libi2pd/Garlic.cpp b/libi2pd/Garlic.cpp index 59089072..888e988c 100644 --- a/libi2pd/Garlic.cpp +++ b/libi2pd/Garlic.cpp @@ -578,7 +578,7 @@ namespace garlic tunnel = from->GetTunnelPool ()->GetNextOutboundTunnel (); else LogPrint (eLogError, "Garlic: Tunnel pool is not set for inbound tunnel"); - if (tunnel) // we have send it through an outbound tunnel + if (tunnel) // we have sent it through an outbound tunnel tunnel->SendTunnelDataMsg (gwHash, gwTunnel, msg); else LogPrint (eLogWarning, "Garlic: No outbound tunnels available for garlic clove"); diff --git a/libi2pd/LeaseSet.cpp b/libi2pd/LeaseSet.cpp index 968b51c0..72a89d52 100644 --- a/libi2pd/LeaseSet.cpp +++ b/libi2pd/LeaseSet.cpp @@ -266,7 +266,7 @@ namespace data BlindedPublicKey::BlindedPublicKey (const std::string& b33) { - uint8_t addr[40]; // TODO: define lenght from b33 + uint8_t addr[40]; // TODO: define length from b33 size_t l = i2p::data::Base32ToByteStream (b33.c_str (), b33.length (), addr, 40); uint32_t checksum = crc32 (0, addr + 3, l - 3); // checksum is Little Endian @@ -650,7 +650,7 @@ namespace data ReadFromBuffer (innerPlainText.data () + 1, lenInnerPlaintext - 1); } else - LogPrint (eLogError, "LeaseSet2: unxpected LeaseSet type ", (int)innerPlainText[0], " inside encrypted LeaseSet"); + LogPrint (eLogError, "LeaseSet2: unexpected LeaseSet type ", (int)innerPlainText[0], " inside encrypted LeaseSet"); } } diff --git a/libi2pd/LeaseSet.h b/libi2pd/LeaseSet.h index 44ed0b71..0df99b91 100644 --- a/libi2pd/LeaseSet.h +++ b/libi2pd/LeaseSet.h @@ -26,7 +26,7 @@ namespace data IdentHash tunnelGateway; uint32_t tunnelID; uint64_t endDate; // 0 means invalid - bool isUpdated; // trasient + bool isUpdated; // transient /* return true if this lease expires within t millisecond + fudge factor */ bool ExpiresWithin( const uint64_t t, const uint64_t fudge = 1000 ) const { auto expire = i2p::util::GetMillisecondsSinceEpoch (); diff --git a/libi2pd/NTCP2.cpp b/libi2pd/NTCP2.cpp index c571e0f0..0976720e 100644 --- a/libi2pd/NTCP2.cpp +++ b/libi2pd/NTCP2.cpp @@ -690,7 +690,7 @@ namespace transport } if (memcmp (addr->ntcp2->staticKey, m_Establisher->m_RemoteStaticKey, 32)) { - LogPrint (eLogError, "NTCP2: Static key mistmatch in SessionConfirmed"); + LogPrint (eLogError, "NTCP2: Static key mismatch in SessionConfirmed"); SendTerminationAndTerminate (eNTCP2IncorrectSParameter); return; } @@ -783,7 +783,7 @@ namespace transport size_t moreBytes = m_Socket.available(ec); if (!ec && moreBytes >= m_NextReceivedLen) { - // read and process messsage immediately if avaliable + // read and process message immediately if available moreBytes = boost::asio::read (m_Socket, boost::asio::buffer(m_NextReceivedBuffer, m_NextReceivedLen), boost::asio::transfer_all (), ec); HandleReceived (ec, moreBytes); } @@ -887,7 +887,7 @@ namespace transport Terminate (); } else - LogPrint (eLogWarning, "NTCP2: Unexpected temination block size ", size); + LogPrint (eLogWarning, "NTCP2: Unexpected termination block size ", size); break; case eNTCP2BlkPadding: LogPrint (eLogDebug, "NTCP2: padding"); diff --git a/libi2pd/NTCPSession.cpp b/libi2pd/NTCPSession.cpp index 8be55466..68a4133f 100644 --- a/libi2pd/NTCPSession.cpp +++ b/libi2pd/NTCPSession.cpp @@ -1287,7 +1287,7 @@ namespace transport if (it.second->IsTerminationTimeoutExpired (ts)) { auto session = it.second; - // Termniate modifies m_NTCPSession, so we postpone it + // Terminate modifies m_NTCPSession, so we postpone it m_Service.post ([session] { LogPrint (eLogDebug, "NTCP: No activity for ", session->GetTerminationTimeout (), " seconds"); session->Terminate (); diff --git a/libi2pd/NetDb.cpp b/libi2pd/NetDb.cpp index 2780bc8f..f0c94284 100644 --- a/libi2pd/NetDb.cpp +++ b/libi2pd/NetDb.cpp @@ -376,7 +376,7 @@ namespace data } m_FloodfillBootstrap = ri; ReseedFromFloodfill(*ri); - // don't try reseed servers if trying to boostrap from floodfill + // don't try reseed servers if trying to bootstrap from floodfill return; } } diff --git a/libi2pd/Reseed.cpp b/libi2pd/Reseed.cpp index 40a0b740..98f95dc3 100644 --- a/libi2pd/Reseed.cpp +++ b/libi2pd/Reseed.cpp @@ -375,7 +375,7 @@ namespace data if (end - contentPos >= contentLength) break; // we are beyond contentLength } - if (numFiles) // check if routers are not outdated + if (numFiles) // check if routers are not outdated { auto ts = i2p::util::GetMillisecondsSinceEpoch (); int numOutdated = 0; diff --git a/libi2pd/RouterInfo.cpp b/libi2pd/RouterInfo.cpp index aecda51e..6b520943 100644 --- a/libi2pd/RouterInfo.cpp +++ b/libi2pd/RouterInfo.cpp @@ -51,7 +51,7 @@ namespace data void RouterInfo::Update (const uint8_t * buf, int len) { - // verify signature since we have indentity already + // verify signature since we have identity already int l = len - m_RouterIdentity->GetSignatureLen (); if (m_RouterIdentity->Verify (buf, l, buf + l)) { @@ -883,7 +883,7 @@ namespace data template std::shared_ptr RouterInfo::GetAddress (Filter filter) const { - // TODO: make it more gereric using comparator + // TODO: make it more generic using comparator #if (BOOST_VERSION >= 105300) auto addresses = boost::atomic_load (&m_Addresses); #else diff --git a/libi2pd/SSUSession.cpp b/libi2pd/SSUSession.cpp index 255adf42..c58e70d6 100644 --- a/libi2pd/SSUSession.cpp +++ b/libi2pd/SSUSession.cpp @@ -212,7 +212,7 @@ namespace transport } if (headerSize >= len) { - LogPrint (eLogError, "Session reaquest header size ", headerSize, " exceeds packet length ", len); + LogPrint (eLogError, "Session request header size ", headerSize, " exceeds packet length ", len); return; } m_RemoteEndpoint = senderEndpoint; @@ -1097,7 +1097,7 @@ namespace transport // intro key if (toAddress) { - // send our intro key to address instead it's own + // send our intro key to address instead of its own auto addr = i2p::context.GetRouterInfo ().GetSSUAddress (); if (addr) memcpy (payload, addr->ssu->key, 32); // intro key diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index 4cd1b1bf..226cd4f6 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -290,7 +290,7 @@ namespace stream LogPrint (eLogInfo, "Streaming: offline signature without identity"); return false; } - // if we have it in LeaseSet already we don't neet parse it again + // if we have it in LeaseSet already we don't need to parse it again if (m_RemoteLeaseSet) m_TransientVerifier = m_RemoteLeaseSet->GetTransientVerifier (); if (m_TransientVerifier) { @@ -602,7 +602,7 @@ namespace stream size++; // NACK count } size++; // resend delay - htobuf16 (packet + size, 0); // nof flags set + htobuf16 (packet + size, 0); // no flags set size += 2; // flags htobuf16 (packet + size, 0); // no options size += 2; // options size diff --git a/libi2pd_client/AddressBook.cpp b/libi2pd_client/AddressBook.cpp index fb335c1c..75d95da1 100644 --- a/libi2pd_client/AddressBook.cpp +++ b/libi2pd_client/AddressBook.cpp @@ -79,7 +79,7 @@ namespace client { if (!m_IsPersist) { - LogPrint(eLogDebug, "Addressbook: Persistance is disabled"); + LogPrint(eLogDebug, "Addressbook: Persistence is disabled"); return nullptr; } std::string filename = storage.Path(ident.ToBase32()); @@ -293,7 +293,7 @@ namespace client } if (m_IsDownloading) { - LogPrint (eLogInfo, "Addressbook: subscriptions is downloading, abort"); + LogPrint (eLogInfo, "Addressbook: subscriptions are downloading, abort"); for (int i = 0; i < 30; i++) { if (!m_IsDownloading) diff --git a/libi2pd_client/HTTPProxy.cpp b/libi2pd_client/HTTPProxy.cpp index 1485f5d5..88c73a8e 100644 --- a/libi2pd_client/HTTPProxy.cpp +++ b/libi2pd_client/HTTPProxy.cpp @@ -208,7 +208,7 @@ namespace proxy { void HTTPReqHandler::SanitizeHTTPRequest(i2p::http::HTTPReq & req) { /* drop common headers */ - req.RemoveHeader("Referer"); + req.RemoveHeader("Referrer"); req.RemoveHeader("Via"); req.RemoveHeader("From"); req.RemoveHeader("Forwarded"); diff --git a/libi2pd_client/I2CP.cpp b/libi2pd_client/I2CP.cpp index d429461b..dbcb3a6c 100644 --- a/libi2pd_client/I2CP.cpp +++ b/libi2pd_client/I2CP.cpp @@ -368,7 +368,7 @@ namespace client size_t offset = identity->FromBuffer (buf, len); if (!offset) { - LogPrint (eLogError, "I2CP: create session maformed identity"); + LogPrint (eLogError, "I2CP: create session malformed identity"); SendSessionStatusMessage (3); // invalid return; }