Browse Source

wrong file version

pull/484/head
weekendi2p 9 years ago
parent
commit
61e8becd38
  1. 1
      Daemon.cpp
  2. 14
      RouterContext.cpp
  3. 1
      RouterContext.h

1
Daemon.cpp

@ -189,6 +189,7 @@ namespace i2p @@ -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);

14
RouterContext.cpp

@ -149,6 +149,14 @@ namespace i2p @@ -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 @@ -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);

1
RouterContext.h

@ -59,6 +59,7 @@ namespace i2p @@ -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 */

Loading…
Cancel
Save