mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-22 12:24:19 +00:00
* sane log messages: RouterInfo.cpp
This commit is contained in:
parent
1cb0826de0
commit
5266d4d79c
@ -62,7 +62,7 @@ namespace data
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "RouterInfo signature verification failed");
|
LogPrint (eLogError, "RouterInfo: signature verification failed");
|
||||||
m_IsUnreachable = true;
|
m_IsUnreachable = true;
|
||||||
}
|
}
|
||||||
m_RouterIdentity->DropVerifier ();
|
m_RouterIdentity->DropVerifier ();
|
||||||
@ -83,7 +83,7 @@ namespace data
|
|||||||
m_BufferLen = s.tellg ();
|
m_BufferLen = s.tellg ();
|
||||||
if (m_BufferLen < 40)
|
if (m_BufferLen < 40)
|
||||||
{
|
{
|
||||||
LogPrint(eLogError, "File", m_FullPath, " is malformed");
|
LogPrint(eLogError, "RouterInfo: File", m_FullPath, " is malformed");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
s.seekg(0, std::ios::beg);
|
s.seekg(0, std::ios::beg);
|
||||||
@ -93,7 +93,7 @@ namespace data
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "Can't open file ", m_FullPath);
|
LogPrint (eLogError, "RouterInfo: Can't open file ", m_FullPath);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -117,7 +117,7 @@ namespace data
|
|||||||
int l = m_BufferLen - m_RouterIdentity->GetSignatureLen ();
|
int l = m_BufferLen - m_RouterIdentity->GetSignatureLen ();
|
||||||
if (!m_RouterIdentity->Verify ((uint8_t *)m_Buffer, l, (uint8_t *)m_Buffer + l))
|
if (!m_RouterIdentity->Verify ((uint8_t *)m_Buffer, l, (uint8_t *)m_Buffer + l))
|
||||||
{
|
{
|
||||||
LogPrint (eLogError, "RouterInfo signature verification failed");
|
LogPrint (eLogError, "RouterInfo: signature verification failed");
|
||||||
m_IsUnreachable = true;
|
m_IsUnreachable = true;
|
||||||
}
|
}
|
||||||
m_RouterIdentity->DropVerifier ();
|
m_RouterIdentity->DropVerifier ();
|
||||||
@ -432,7 +432,7 @@ namespace data
|
|||||||
if (!m_Buffer)
|
if (!m_Buffer)
|
||||||
{
|
{
|
||||||
if (LoadFile ())
|
if (LoadFile ())
|
||||||
LogPrint ("Buffer for ", GetIdentHashAbbreviation (GetIdentHash ()), " loaded from file");
|
LogPrint (eLogDebug, "RouterInfo: Buffer for ", GetIdentHashAbbreviation (GetIdentHash ()), " loaded from file");
|
||||||
}
|
}
|
||||||
return m_Buffer;
|
return m_Buffer;
|
||||||
}
|
}
|
||||||
@ -463,10 +463,10 @@ namespace data
|
|||||||
if (f.is_open ())
|
if (f.is_open ())
|
||||||
f.write ((char *)m_Buffer, m_BufferLen);
|
f.write ((char *)m_Buffer, m_BufferLen);
|
||||||
else
|
else
|
||||||
LogPrint(eLogError, "Can't save RouterInfo to ", fullPath);
|
LogPrint(eLogError, "RouterInfo: Can't save to ", fullPath);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
LogPrint (eLogError, "Can't save RouterInfo m_Buffer==NULL");
|
LogPrint (eLogError, "RouterInfo: Can't save, m_Buffer == NULL");
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t RouterInfo::ReadString (char * str, std::istream& s)
|
size_t RouterInfo::ReadString (char * str, std::istream& s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user