From 6330a4c2a996a2b9f3c458517328ae2b1b6d2fae Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Mon, 10 Jul 2023 20:29:05 -0400 Subject: [PATCH] fix some log messages; ensure VOC is forcibly disabled if control support is disabled; --- src/host/Host.cpp | 4 ++-- src/p25/Control.cpp | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/host/Host.cpp b/src/host/Host.cpp index 4a203032..8b18ea66 100644 --- a/src/host/Host.cpp +++ b/src/host/Host.cpp @@ -1842,7 +1842,7 @@ bool Host::readParams() m_controlChData = data; if (!m_controlChData.address().empty() && m_controlChData.port() > 0) { - ::LogInfoEx(LOG_HOST, "Control Channel REST API Adddress %s:%u", m_controlChData.address().c_str(), m_controlChData.port()); + ::LogInfoEx(LOG_HOST, "Control Channel REST API Address %s:%u", m_controlChData.address().c_str(), m_controlChData.port()); } else { ::LogInfoEx(LOG_HOST, "No Control Channel REST API Configured, CC notify disabled"); } @@ -1873,7 +1873,7 @@ bool Host::readParams() uint16_t restApiPort = (uint16_t)channel["restPort"].as(REST_API_DEFAULT_PORT); std::string restApiPassword = channel["restPassword"].as(); - ::LogInfoEx(LOG_HOST, "Voice Channel Id %u Channel No $%04X REST API Adddress %s:%u", m_channelId, chNo, restApiAddress.c_str(), restApiPort); + ::LogInfoEx(LOG_HOST, "Voice Channel Id %u Channel No $%04X REST API Address %s:%u", m_channelId, chNo, restApiAddress.c_str(), restApiPort); VoiceChData data = VoiceChData(chNo, restApiAddress, restApiPort, restApiPassword); m_voiceChData[chNo] = data; diff --git a/src/p25/Control.cpp b/src/p25/Control.cpp index 28a2b7b4..6ace6ac0 100644 --- a/src/p25/Control.cpp +++ b/src/p25/Control.cpp @@ -254,6 +254,12 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw } m_voiceOnControl = p25Protocol["voiceOnControl"].as(false); + + // if control channel is off for voice on control off + if (!m_control) { + m_voiceOnControl = false; + } + m_ackTSBKRequests = control["ackRequests"].as(true); m_trunk->m_ctrlTSDUMBF = !control["disableTSDUMBF"].as(false); m_trunk->m_ctrlTimeDateAnn = control["enableTimeDateAnn"].as(false); @@ -349,7 +355,7 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw yaml::Node rfssConfig = systemConf["config"]; yaml::Node controlCh = rfssConfig["controlCh"]; m_notifyCC = controlCh["notifyEnable"].as(false); - + // voice on control forcibly disables CC notification if (m_voiceOnControl) { m_notifyCC = false; @@ -857,7 +863,7 @@ void Control::touchGrantTG(uint32_t dstId) if (m_affiliations.isGranted(dstId)) { if (m_verbose) { - LogMessage(LOG_P25, "REST request, touch TG grant, dstId = %u", dstId); + LogMessage(LOG_P25, "REST request, call in progress, touch TG grant, dstId = %u", dstId); } m_affiliations.touchGrant(dstId);