Skip to content

Commit

Permalink
fix some log messages; ensure VOC is forcibly disabled if control sup…
Browse files Browse the repository at this point in the history
…port is disabled;
  • Loading branch information
gatekeep committed Jul 11, 2023
1 parent ff66d6b commit 6330a4c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/host/Host.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down Expand Up @@ -1873,7 +1873,7 @@ bool Host::readParams()
uint16_t restApiPort = (uint16_t)channel["restPort"].as<uint32_t>(REST_API_DEFAULT_PORT);
std::string restApiPassword = channel["restPassword"].as<std::string>();

::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;
Expand Down
10 changes: 8 additions & 2 deletions src/p25/Control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,12 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw
}

m_voiceOnControl = p25Protocol["voiceOnControl"].as<bool>(false);

// if control channel is off for voice on control off
if (!m_control) {
m_voiceOnControl = false;
}

m_ackTSBKRequests = control["ackRequests"].as<bool>(true);
m_trunk->m_ctrlTSDUMBF = !control["disableTSDUMBF"].as<bool>(false);
m_trunk->m_ctrlTimeDateAnn = control["enableTimeDateAnn"].as<bool>(false);
Expand Down Expand Up @@ -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<bool>(false);

// voice on control forcibly disables CC notification
if (m_voiceOnControl) {
m_notifyCC = false;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6330a4c

Please sign in to comment.