diff --git a/src/p25/Control.cpp b/src/p25/Control.cpp index 2bbd17a5..4da0fc6c 100644 --- a/src/p25/Control.cpp +++ b/src/p25/Control.cpp @@ -254,13 +254,19 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw } m_voiceOnControl = p25Protocol["voiceOnControl"].as(false); - m_controlOnly = p25Protocol["controlOnly"].as(false); // if control channel is off for voice on control off if (!m_control) { m_voiceOnControl = false; } + m_controlOnly = p25Protocol["controlOnly"].as(false); + + // if we're a dedicated control channel don't set the control only flag + if (m_dedicatedControl) { + m_controlOnly = false; + } + m_ackTSBKRequests = control["ackRequests"].as(true); m_trunk->m_ctrlTSDUMBF = !control["disableTSDUMBF"].as(false); m_trunk->m_ctrlTimeDateAnn = control["enableTimeDateAnn"].as(false); @@ -373,6 +379,10 @@ void Control::setOptions(yaml::Node& conf, bool supervisor, const std::string cw } } + if (m_controlOnly) { + LogInfo(" Control Data Only: yes"); + } + LogInfo(" Notify Control: %s", m_notifyCC ? "yes" : "no"); LogInfo(" Disable Network HDUs: %s", m_disableNetworkHDU ? "yes" : "no"); if (!m_trunk->m_ctrlTSDUMBF) { @@ -558,13 +568,7 @@ bool Control::processFrame(uint8_t* data, uint32_t len) break; case P25_DUID_PDU: - if (!m_dedicatedControl) - ret = m_data->process(data, len); - else { - if (m_voiceOnControl && m_affiliations.isChBusy(m_siteData.channelNo())) { - ret = m_data->process(data, len); - } - } + ret = m_data->process(data, len); break; case P25_DUID_TSDU: diff --git a/src/p25/packet/Data.cpp b/src/p25/packet/Data.cpp index 6d443f6c..560801ec 100644 --- a/src/p25/packet/Data.cpp +++ b/src/p25/packet/Data.cpp @@ -162,14 +162,14 @@ bool Data::process(uint8_t* data, uint32_t len) return false; } - // If we're in control only mode, we only want to handle AMBTs. Otherwise return - if (m_p25->m_controlOnly && m_rfDataHeader.getMFId() != PDU_FMT_AMBT) { + // if we're a dedicated CC or in control only mode, we only want to handle AMBTs. Otherwise return + if ((m_p25->m_dedicatedControl || m_p25->m_controlOnly) && m_rfDataHeader.getMFId() != PDU_FMT_AMBT) { if (m_debug) { LogDebug(LOG_RF, "CC only mode, ignoring non-AMBT PDU from RF"); } - // Reset the CC halted flag + m_p25->m_ccHalted = false; - // Reset everything else + m_rfDataHeader.reset(); m_rfSecondHeader.reset(); m_rfDataBlockCnt = 0U; @@ -508,12 +508,12 @@ bool Data::processNetwork(uint8_t* data, uint32_t len, uint32_t blockLength) return false; } - // If we're in control only mode, we only want to handle AMBTs. Otherwise return - if (m_p25->m_controlOnly && m_rfDataHeader.getMFId() != PDU_FMT_AMBT) { + // if we're a dedicated CC or in control only mode, we only want to handle AMBTs. Otherwise return + if ((m_p25->m_dedicatedControl || m_p25->m_controlOnly) && m_rfDataHeader.getMFId() != PDU_FMT_AMBT) { if (m_debug) { LogDebug(LOG_NET, "CC only mode, ignoring non-AMBT PDU from network"); } - // Reset everything else + m_netDataHeader.reset(); m_netSecondHeader.reset(); m_netDataOffset = 0U;