From f0d098d0efb31e7473a186942e1201343578cae3 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 11 Oct 2016 13:39:07 -0400 Subject: [PATCH] use shared local destination for lookup if destination is not set --- BOB.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/BOB.cpp b/BOB.cpp index 28e7f68b..d68c798f 100644 --- a/BOB.cpp +++ b/BOB.cpp @@ -504,17 +504,12 @@ namespace client { LogPrint (eLogDebug, "BOB: lookup ", operand); i2p::data::IdentHash ident; - if (!context.GetAddressBook ().GetIdentHash (operand, ident) || !m_CurrentDestination) + if (!context.GetAddressBook ().GetIdentHash (operand, ident)) { SendReplyError ("Address Not found"); return; } - if (!m_CurrentDestination) - { - SendReplyError ("session not created"); - return; - } - auto localDestination = m_CurrentDestination->GetLocalDestination (); + auto localDestination = m_CurrentDestination ? m_CurrentDestination->GetLocalDestination () : i2p::client::context.GetSharedLocalDestination (); auto leaseSet = localDestination->FindLeaseSet (ident); if (leaseSet) SendReplyOK (leaseSet->GetIdentity ()->ToBase64 ().c_str ());