Add optional diabling of file rotation and UDP socket bug fixing.

This commit is contained in:
Jonathan Naylor 2020-11-01 12:28:12 +00:00
parent c9c7705628
commit 81170f53ee
26 changed files with 196 additions and 22 deletions

View file

@ -64,6 +64,7 @@ m_logDisplayLevel(0U),
m_logFileLevel(0U),
m_logFilePath(),
m_logFileRoot(),
m_logFileRotate(true),
m_aprsEnabled(false),
m_aprsAddress(),
m_aprsPort(0U),
@ -221,6 +222,8 @@ bool CConf::read()
m_logFileLevel = (unsigned int)::atoi(value);
else if (::strcmp(key, "DisplayLevel") == 0)
m_logDisplayLevel = (unsigned int)::atoi(value);
else if (::strcmp(key, "FileRotate") == 0)
m_logFileRotate = ::atoi(value) == 1;
} else if (section == SECTION_APRS) {
if (::strcmp(key, "Enable") == 0)
m_aprsEnabled = ::atoi(value) == 1;
@ -410,6 +413,11 @@ std::string CConf::getLogFileRoot() const
return m_logFileRoot;
}
bool CConf::getLogFileRotate() const
{
return m_logFileRotate;
}
bool CConf::getAPRSEnabled() const
{
return m_aprsEnabled;