Browse Source

populate session keys

pull/113/head
orignal 10 years ago
parent
commit
e84d4e5f42
  1. 12
      BOB.cpp

12
BOB.cpp

@ -18,6 +18,7 @@ namespace client @@ -18,6 +18,7 @@ namespace client
BOBI2PInboundTunnel::~BOBI2PInboundTunnel ()
{
Stop ();
}
void BOBI2PInboundTunnel::Start ()
@ -153,6 +154,7 @@ namespace client @@ -153,6 +154,7 @@ namespace client
if (ecode)
{
LogPrint ("BOB command channel read error: ", ecode.message ());
if (ecode != boost::asio::error::operation_aborted)
Terminate ();
}
else
@ -208,6 +210,7 @@ namespace client @@ -208,6 +210,7 @@ namespace client
if (ecode)
{
LogPrint ("BOB command channel send error: ", ecode.message ());
if (ecode != boost::asio::error::operation_aborted)
Terminate ();
}
else
@ -277,6 +280,7 @@ namespace client @@ -277,6 +280,7 @@ namespace client
if (tunnel)
{
tunnel->Stop ();
tunnel->GetLocalDestination ()->Stop ();
SendReplyOK ("tunnel stopping");
}
else
@ -287,7 +291,7 @@ namespace client @@ -287,7 +291,7 @@ namespace client
{
LogPrint (eLogDebug, "BOB: setnick");
m_Nickname = operand;
std::string msg ("Nickname set to");
std::string msg ("Nickname set to ");
msg += operand;
SendReplyOK (msg.c_str ());
}
@ -295,10 +299,12 @@ namespace client @@ -295,10 +299,12 @@ namespace client
void BOBCommandSession::GetNickCommandHandler (const char * operand, size_t len)
{
LogPrint (eLogDebug, "BOB: getnick");
if (m_Owner.FindTunnel (operand))
auto tunnel = m_Owner.FindTunnel (operand);
if (tunnel)
{
m_Keys = tunnel->GetLocalDestination ()->GetPrivateKeys ();
m_Nickname = operand;
std::string msg ("Nickname set to");
std::string msg ("Nickname set to ");
msg += operand;
SendReplyOK (msg.c_str ());
}

Loading…
Cancel
Save