Rename the YSF Network section.

This commit is contained in:
Jonathan Naylor 2020-09-08 09:29:17 +01:00
parent 2f5118a027
commit d8cad28cd6
5 changed files with 22 additions and 22 deletions

View File

@ -31,7 +31,7 @@ enum SECTION {
SECTION_GENERAL,
SECTION_ID_LOOKUP,
SECTION_LOG,
SECTION_YSF_NETWORK,
SECTION_NETWORK,
SECTION_ICOM_NETWORK,
SECTION_KENWOOD_NETWORK
};
@ -46,8 +46,8 @@ m_logDisplayLevel(0U),
m_logFileLevel(0U),
m_logFilePath(),
m_logFileRoot(),
m_ysfPort(0U),
m_ysfDebug(false),
m_networkPort(0U),
m_networkDebug(false),
m_icomEnabled(false),
m_icomAddress(),
m_icomTGEnable(0U),
@ -87,8 +87,8 @@ bool CConf::read()
section = SECTION_ID_LOOKUP;
else if (::strncmp(buffer, "[Log]", 5U) == 0)
section = SECTION_LOG;
else if (::strncmp(buffer, "[YSF Network]", 13U) == 0)
section = SECTION_YSF_NETWORK;
else if (::strncmp(buffer, "[Network]", 9U) == 0)
section = SECTION_NETWORK;
else if (::strncmp(buffer, "[Icom Network]", 14U) == 0)
section = SECTION_ICOM_NETWORK;
else if (::strncmp(buffer, "[Kenwood Network]", 17U) == 0)
@ -123,11 +123,11 @@ bool CConf::read()
m_logFileLevel = (unsigned int)::atoi(value);
else if (::strcmp(key, "DisplayLevel") == 0)
m_logDisplayLevel = (unsigned int)::atoi(value);
} else if (section == SECTION_YSF_NETWORK) {
} else if (section == SECTION_NETWORK) {
if (::strcmp(key, "Port") == 0)
m_ysfPort = (unsigned int)::atoi(value);
m_networkPort = (unsigned int)::atoi(value);
else if (::strcmp(key, "Debug") == 0)
m_ysfDebug = ::atoi(value) == 1;
m_networkDebug = ::atoi(value) == 1;
} else if (section == SECTION_ICOM_NETWORK) {
if (::strcmp(key, "Enabled") == 0)
m_icomEnabled = ::atoi(value) == 1;
@ -190,22 +190,22 @@ unsigned int CConf::getLogFileLevel() const
std::string CConf::getLogFilePath() const
{
return m_logFilePath;
return m_logFilePath;
}
std::string CConf::getLogFileRoot() const
{
return m_logFileRoot;
return m_logFileRoot;
}
unsigned int CConf::getYSFPort() const
unsigned int CConf::getNetworkPort() const
{
return m_ysfPort;
return m_networkPort;
}
bool CConf::getYSFDebug() const
bool CConf::getNetworkDebug() const
{
return m_ysfDebug;
return m_networkDebug;
}
bool CConf::getIcomEnabled() const

View File

@ -44,9 +44,9 @@ public:
std::string getLogFilePath() const;
std::string getLogFileRoot() const;
// The YSF Network section
unsigned int getYSFPort() const;
bool getYSFDebug() const;
// The Network section
unsigned int getNetworkPort() const;
bool getNetworkDebug() const;
// The Icom Network section
bool getIcomEnabled() const;
@ -75,8 +75,8 @@ private:
std::string m_logFilePath;
std::string m_logFileRoot;
unsigned int m_ysfPort;
bool m_ysfDebug;
unsigned int m_networkPort;
bool m_networkDebug;
bool m_icomEnabled;
std::string m_icomAddress;

View File

@ -168,7 +168,7 @@ void CNXDNReflector::run()
unsigned short tg = m_conf.getTG();
CNXDNNetwork nxdnNetwork(m_conf.getYSFPort(), m_conf.getYSFDebug());
CNXDNNetwork nxdnNetwork(m_conf.getNetworkPort(), m_conf.getNetworkDebug());
ret = nxdnNetwork.open();
if (!ret) {
::LogFinalise();

View File

@ -13,7 +13,7 @@ FileLevel=1
FilePath=.
FileRoot=NXDNReflector
[YSF Network]
[Network]
Port=41400
Debug=0

View File

@ -19,6 +19,6 @@
#if !defined(VERSION_H)
#define VERSION_H
const char* VERSION = "20200823";
const char* VERSION = "20200908";
#endif