Merge pull request #569 from majestrate/make-function-static

Make function static
pull/570/head
Jeff 5 years ago committed by GitHub
commit 9d9b65413c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,7 +13,7 @@ namespace llarp
static constexpr size_t EncryptedFrameOverheadSize =
PUBKEYSIZE + TUNNONCESIZE + SHORTHASHSIZE;
static constexpr size_t EncryptedFrameBodySize = 1024;
static constexpr size_t EncryptedFrameBodySize = 128 * 6;
static constexpr size_t EncryptedFrameSize =
EncryptedFrameOverheadSize + EncryptedFrameBodySize;

@ -244,7 +244,7 @@ namespace llarp
// store it into netdb if we don't have it
if(!n->Has(rc.pubkey))
{
std::function< void(std::shared_ptr< LRCMFrameDecrypt >) > cb =
static std::function< void(std::shared_ptr< LRCMFrameDecrypt >) > cb =
[](std::shared_ptr< LRCMFrameDecrypt > ctx) {
ctx->context->ForwardLRCM(ctx->hop->info.upstream,
ctx->frames);

@ -255,9 +255,6 @@ namespace llarp
{
if(sendq.size() >= MaxSendQueueSize)
return false;
// preemptive pump
if(sendq.size() >= MaxSendQueueSize / 8)
PumpWrite();
size_t sz = buf.sz;
byte_t* ptr = buf.base;
uint32_t msgid = m_NextTXMsgID++;
@ -273,6 +270,7 @@ namespace llarp
ptr += s;
sz -= s;
}
PumpWrite();
return true;
}

Loading…
Cancel
Save