Browse Source

set default nickname after initialization

pull/972/head
orignal 7 years ago
parent
commit
7d7f5ff4e2
  1. 7
      libi2pd/Destination.cpp

7
libi2pd/Destination.cpp

@ -58,10 +58,7 @@ namespace client @@ -58,10 +58,7 @@ namespace client
}
}
it = params->find (I2CP_PARAM_INBOUND_NICKNAME);
if (it != params->end ())
m_Nickname = it->second;
else
m_Nickname = i2p::data::GetIdentHashAbbreviation (GetIdentHash ());
if (it != params->end ()) m_Nickname = it->second; // otherwise we set deafult nickname in Start when we know local address
}
}
catch (std::exception & ex)
@ -119,6 +116,8 @@ namespace client @@ -119,6 +116,8 @@ namespace client
{
if (!m_IsRunning)
{
if (m_Nickname.empty ())
m_Nickname = i2p::data::GetIdentHashAbbreviation (GetIdentHash ()); // set default nickname
LoadTags ();
m_IsRunning = true;
m_Pool->SetLocalDestination (shared_from_this ());

Loading…
Cancel
Save