From d8cad28cd62990e07c12c6e92d570a7e4d1c3df5 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Tue, 8 Sep 2020 09:29:17 +0100 Subject: [PATCH] Rename the YSF Network section. --- NXDNReflector/Conf.cpp | 28 ++++++++++++++-------------- NXDNReflector/Conf.h | 10 +++++----- NXDNReflector/NXDNReflector.cpp | 2 +- NXDNReflector/NXDNReflector.ini | 2 +- NXDNReflector/Version.h | 2 +- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/NXDNReflector/Conf.cpp b/NXDNReflector/Conf.cpp index fac5759..dd69f82 100644 --- a/NXDNReflector/Conf.cpp +++ b/NXDNReflector/Conf.cpp @@ -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 diff --git a/NXDNReflector/Conf.h b/NXDNReflector/Conf.h index 2357967..ed32c16 100644 --- a/NXDNReflector/Conf.h +++ b/NXDNReflector/Conf.h @@ -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; diff --git a/NXDNReflector/NXDNReflector.cpp b/NXDNReflector/NXDNReflector.cpp index 9cf49ec..e746ee2 100644 --- a/NXDNReflector/NXDNReflector.cpp +++ b/NXDNReflector/NXDNReflector.cpp @@ -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(); diff --git a/NXDNReflector/NXDNReflector.ini b/NXDNReflector/NXDNReflector.ini index 4e29db4..ca89b1d 100644 --- a/NXDNReflector/NXDNReflector.ini +++ b/NXDNReflector/NXDNReflector.ini @@ -13,7 +13,7 @@ FileLevel=1 FilePath=. FileRoot=NXDNReflector -[YSF Network] +[Network] Port=41400 Debug=0 diff --git a/NXDNReflector/Version.h b/NXDNReflector/Version.h index a12e5e2..b52ac54 100644 --- a/NXDNReflector/Version.h +++ b/NXDNReflector/Version.h @@ -19,6 +19,6 @@ #if !defined(VERSION_H) #define VERSION_H -const char* VERSION = "20200823"; +const char* VERSION = "20200908"; #endif