wrong file version

This commit is contained in:
weekendi2p 2016-04-27 00:48:23 +02:00
parent a78caa2976
commit 61e8becd38
3 changed files with 10 additions and 6 deletions

View File

@ -189,6 +189,7 @@ namespace i2p
std::string family; i2p::config::GetOption("family", family);
i2p::context.SetFamily (family);
i2p::context.SetFamilyString (family);
if (family.length () > 0)
LogPrint(eLogInfo, "Daemon: family set to ", family);

View File

@ -149,6 +149,14 @@ namespace i2p
UpdateRouterInfo ();
}
void RouterContext::SetFamilyString (const std::string& family)
{
if (family.length() > 0)
m_FamilyString = family;
else
m_FamilyString = "<undefined>";
}
std::string RouterContext::GetFamilyString () const
{
return m_FamilyString;
@ -157,15 +165,9 @@ namespace i2p
void RouterContext::SetFamily (const std::string& family)
{
m_FamilyString = family;
if (m_FamilyString.length() == 0)
m_FamilyString = "<undefined>";
std::string signature;
if (family.length () > 0)
{
signature = i2p::data::CreateFamilySignature (family, GetIdentHash ());
}
if (signature.length () > 0)
{
m_RouterInfo.SetProperty (i2p::data::ROUTER_INFO_PROPERTY_FAMILY, family);

View File

@ -59,6 +59,7 @@ namespace i2p
bool IsFloodfill () const { return m_IsFloodfill; };
void SetFloodfill (bool floodfill);
void SetFamily (const std::string& family);
void SetFamilyString (const std::string& family);
std::string GetFamilyString () const;
void SetBandwidth (int limit); /* in kilobytes */
void SetBandwidth (char L); /* by letter */