mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
Fix typos
This commit is contained in:
parent
ef0fb48f1f
commit
6a497a23d9
@ -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;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ namespace config {
|
||||
("limits.coresize", value<uint32_t>()->default_value(0), "Maximum size of corefile in Kb (0 - use system limit)")
|
||||
("limits.openfiles", value<uint16_t>()->default_value(0), "Maximum number of open files (0 - use system default)")
|
||||
("limits.transittunnels", value<uint16_t>()->default_value(2500), "Maximum active transit sessions (default:2500)")
|
||||
("limits.ntcpsoft", value<uint16_t>()->default_value(0), "Threshold to start probabalistic backoff with ntcp sessions (default: use system limit)")
|
||||
("limits.ntcpsoft", value<uint16_t>()->default_value(0), "Threshold to start probabilistic backoff with ntcp sessions (default: use system limit)")
|
||||
("limits.ntcphard", value<uint16_t>()->default_value(0), "Maximum number of ntcp sessions (default: use system limit)")
|
||||
("limits.ntcpthreads", value<uint16_t>()->default_value(1), "Maximum number of threads used by NTCP DH worker (default: 1)")
|
||||
;
|
||||
@ -153,8 +153,8 @@ namespace config {
|
||||
("i2pcontrol.address", value<std::string>()->default_value("127.0.0.1"), "I2PCP listen address")
|
||||
("i2pcontrol.port", value<uint16_t>()->default_value(7650), "I2PCP listen port")
|
||||
("i2pcontrol.password", value<std::string>()->default_value("itoopie"), "I2PCP access password")
|
||||
("i2pcontrol.cert", value<std::string>()->default_value("i2pcontrol.crt.pem"), "I2PCP connection cerificate")
|
||||
("i2pcontrol.key", value<std::string>()->default_value("i2pcontrol.key.pem"), "I2PCP connection cerificate key")
|
||||
("i2pcontrol.cert", value<std::string>()->default_value("i2pcontrol.crt.pem"), "I2PCP connection certificate")
|
||||
("i2pcontrol.key", value<std::string>()->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<bool>()->default_value(upnp_default), "Enable or disable UPnP: automatic port forwarding")
|
||||
("upnp.name", value<std::string>()->default_value("I2Pd"), "Name i2pd appears in UPnP forwardings list")
|
||||
("upnp.name", value<std::string>()->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<bool>()->default_value(true), "Persist peer profiles (default: true)")
|
||||
("persist.addressbook", value<bool>()->default_value(true), "Persist full addreses (default: true)")
|
||||
("persist.addressbook", value<bool>()->default_value(true), "Persist full addresses (default: true)")
|
||||
;
|
||||
|
||||
m_OptionsDesc
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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 */
|
||||
|
@ -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");
|
||||
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 ();
|
||||
|
@ -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");
|
||||
|
@ -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 ();
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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<typename Filter>
|
||||
std::shared_ptr<const RouterInfo::Address> 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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user