From b1f8f9830b16468718c4fa247595275315ab37c2 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 11 Oct 2016 10:18:42 -0400 Subject: [PATCH] fixed another cases for #651 --- BOB.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/BOB.cpp b/BOB.cpp index fc49749f..28e7f68b 100644 --- a/BOB.cpp +++ b/BOB.cpp @@ -437,8 +437,11 @@ namespace client void BOBCommandSession::GetkeysCommandHandler (const char * operand, size_t len) { LogPrint (eLogDebug, "BOB: getkeys"); - SendReplyOK (m_Keys.ToBase64 ().c_str ()); - } + if (m_Keys.GetPublic ()) // keys are set ? + SendReplyOK (m_Keys.ToBase64 ().c_str ()); + else + SendReplyError ("keys are not set"); + } void BOBCommandSession::GetdestCommandHandler (const char * operand, size_t len) { @@ -506,6 +509,11 @@ namespace client SendReplyError ("Address Not found"); return; } + if (!m_CurrentDestination) + { + SendReplyError ("session not created"); + return; + } auto localDestination = m_CurrentDestination->GetLocalDestination (); auto leaseSet = localDestination->FindLeaseSet (ident); if (leaseSet)