Merge pull request #1033 from majestrate/prevent-segfault-2020-01-10

prevent segfault
This commit is contained in:
Jeff 2020-01-10 17:35:49 -05:00 committed by GitHub
commit 0ad2809ac7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,8 +196,8 @@ namespace llarp
m_Endpoint->RouterLogic(), remoteIdent, m_Endpoint->GetIdentity(), m_Endpoint->RouterLogic(), remoteIdent, m_Endpoint->GetIdentity(),
currentIntroSet.K, remoteIntro, m_DataHandler, currentConvoTag, t); currentIntroSet.K, remoteIntro, m_DataHandler, currentConvoTag, t);
ex->hook = ex->hook = std::bind(&OutboundContext::Send, shared_from_this(),
std::bind(&OutboundContext::Send, this, std::placeholders::_1, path); std::placeholders::_1, path);
ex->msg.PutBuffer(payload); ex->msg.PutBuffer(payload);
ex->msg.introReply = path->intro; ex->msg.introReply = path->intro;
@ -236,7 +236,8 @@ namespace llarp
if(path) if(path)
{ {
HiddenServiceAddressLookup* job = new HiddenServiceAddressLookup( HiddenServiceAddressLookup* job = new HiddenServiceAddressLookup(
m_Endpoint, util::memFn(&OutboundContext::OnIntroSetUpdate, this), m_Endpoint,
util::memFn(&OutboundContext::OnIntroSetUpdate, shared_from_this()),
addr, m_Endpoint->GenTXID()); addr, m_Endpoint->GenTXID());
updatingIntroSet = job->SendRequestViaPath(path, m_Endpoint->Router()); updatingIntroSet = job->SendRequestViaPath(path, m_Endpoint->Router());