pull/606/head
Jeff Becker 5 years ago
parent a793eee4b7
commit 351c241c0f
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -75,7 +75,7 @@ struct TryConnectJob
Success()
{
router->routerProfiling().MarkConnectSuccess(rc.pubkey);
router->FlushOutboundFor(rc.pubkey, link);
router->FlushOutboundFor(rc.pubkey, link.get());
}
/// return true to remove
@ -478,12 +478,12 @@ namespace llarp
}
void
Router::AddLink(std::unique_ptr< ILinkLayer > link, bool inbound)
Router::AddLink(std::shared_ptr< ILinkLayer > link, bool inbound)
{
if(inbound)
inboundLinks.emplace(std::move(link));
inboundLinks.emplace(link);
else
outboundLinks.emplace(std::move(link));
outboundLinks.emplace(link);
}
bool

@ -330,7 +330,7 @@ namespace llarp
const llarp_buffer_t &msg) override;
void
AddLink(std::unique_ptr< ILinkLayer > link, bool outbound = false);
AddLink(std::shared_ptr< ILinkLayer > link, bool outbound = false);
bool
InitOutboundLinks();

@ -9,7 +9,7 @@ namespace llarp
{
using namespace std::placeholders;
LinkLaye_ptr
LinkLayer_ptr
NewServer(Crypto* crypto, const SecretKey& routerEncSecret, GetRCFunc getrc,
LinkMessageHandler h, SessionEstablishedHandler est,
SessionRenegotiateHandler reneg, SignBufferFunc sign,

@ -28,6 +28,7 @@ struct EventLoopTest : public ::testing::Test
SetUp()
{
loop = llarp_make_ev_loop();
_logic.start();
_logic.call_later({10000, this, &OnTimeout});
}

@ -54,7 +54,7 @@ struct LinkLayerTest : public ::testing::Test
return rc.Sign(crypto, signingKey);
}
std::unique_ptr< llarp::ILinkLayer > link;
std::shared_ptr< llarp::ILinkLayer > link;
static std::string
localLoopBack()

Loading…
Cancel
Save