fix issue where network grants would trigger local grant transmissions, even if the TG was already granted;

pull/25/head
Bryan Biedenkapp 3 years ago
parent 590aeb0bea
commit 0282689e98

@ -449,27 +449,35 @@ void ControlSignaling::processNetwork(const data::Data & dmrData)
writeRF_CSBK_ACK_RSP(srcId, TS_WAIT_RSN, 1U);
if (m_slot->m_authoritative) {
if (!m_slot->m_affiliations->isGranted(dstId)) {
writeRF_CSBK_Grant(srcId, dstId, isp->getServiceOptions(), false);
}
}
break;
case SVC_KIND_GRP_VOICE_CALL:
writeRF_CSBK_ACK_RSP(srcId, TS_WAIT_RSN, 1U);
if (m_slot->m_authoritative) {
if (!m_slot->m_affiliations->isGranted(dstId)) {
writeRF_CSBK_Grant(srcId, dstId, isp->getServiceOptions(), true);
}
}
break;
case SVC_KIND_IND_DATA_CALL:
case SVC_KIND_IND_UDT_DATA_CALL:
writeRF_CSBK_ACK_RSP(srcId, TS_WAIT_RSN, 0U);
if (!m_slot->m_affiliations->isGranted(dstId)) {
writeRF_CSBK_Data_Grant(srcId, dstId, isp->getServiceOptions(), false);
}
break;
case SVC_KIND_GRP_DATA_CALL:
case SVC_KIND_GRP_UDT_DATA_CALL:
writeRF_CSBK_ACK_RSP(srcId, TS_WAIT_RSN, 0U);
if (!m_slot->m_affiliations->isGranted(dstId)) {
writeRF_CSBK_Data_Grant(srcId, dstId, isp->getServiceOptions(), true);
}
break;
case SVC_KIND_REG_SVC:
break;

@ -268,9 +268,11 @@ bool Trunk::processNetwork(uint8_t fct, uint8_t option, lc::RTCH& netLC, uint8_t
(rcch->getPriority() & 0x07U); // Priority
if (m_nxdn->m_dedicatedControl && !m_nxdn->m_voiceOnControl) {
if (!m_nxdn->m_affiliations.isGranted(dstId)) {
writeRF_Message_Grant(srcId, dstId, serviceOptions, true);
}
}
}
return true; // don't allow this to write to the air
default:
LogError(LOG_NET, "NXDN, unhandled message type, messageType = $%02X", rcch->getMessageType());

@ -711,9 +711,11 @@ bool Trunk::processNetwork(uint8_t* data, uint32_t len, lc::LC& control, data::L
(tsbk->getPriority() & 0x07U); // Priority
if (m_p25->m_dedicatedControl && !m_p25->m_voiceOnControl) {
if (!m_p25->m_affiliations.isGranted(dstId)) {
writeRF_TSDU_Grant(srcId, dstId, serviceOptions, true);
}
}
}
return true; // don't allow this to write to the air
case TSBK_IOSP_UU_VCH:
{
@ -727,9 +729,11 @@ bool Trunk::processNetwork(uint8_t* data, uint32_t len, lc::LC& control, data::L
(tsbk->getPriority() & 0x07U); // Priority
if (m_p25->m_dedicatedControl && !m_p25->m_voiceOnControl) {
if (!m_p25->m_affiliations.isGranted(dstId)) {
writeRF_TSDU_Grant(srcId, dstId, serviceOptions, false);
}
}
}
return true; // don't allow this to write to the air
case TSBK_IOSP_UU_ANS:
{
@ -2235,8 +2239,8 @@ bool Trunk::writeRF_TSDU_Grant(uint32_t srcId, uint32_t dstId, uint8_t serviceOp
// callback REST API to permit the granted TG on the specified voice channel
if (m_p25->m_authoritative && m_p25->m_supervisor) {
::lookups::VoiceChData voiceChData = m_p25->m_affiliations.getRFChData(chNo);
if (voiceChData.isValidCh() && !voiceChData.address().empty() && voiceChData.port() > 0 &&
chNo != m_p25->m_siteData.channelNo()) {
if (voiceChData.isValidCh() && !voiceChData.address().empty() && voiceChData.port() > 0/* &&
chNo != m_p25->m_siteData.channelNo()*/) {
json::object req = json::object();
int state = modem::DVM_STATE::STATE_P25;
req["state"].set<int>(state);

Loading…
Cancel
Save

Powered by TurnKey Linux.