Materialize temporary string obtained from boost path

This commit is contained in:
Mikhail Titov 2015-06-19 14:44:50 -05:00
parent 38ebe28923
commit 490b65dfe2
4 changed files with 23 additions and 35 deletions

View file

@ -447,10 +447,13 @@ namespace data
if (m_Buffer)
{
std::ofstream f (fullPath, std::ofstream::binary | std::ofstream::out);
f.write ((char *)m_Buffer, m_BufferLen);
}
if (f.is_open ())
f.write ((char *)m_Buffer, m_BufferLen);
else
LogPrint(eLogError, "Can't save RouterInfo to ", fullPath);
}
else
LogPrint (eLogError, "Can't save to file");
LogPrint (eLogError, "Can't save RouterInfo m_Buffer==NULL");
}
size_t RouterInfo::ReadString (char * str, std::istream& s)