fix issue where parrot originating was not muting the initial call to other peers;

pull/61/head
Bryan Biedenkapp 2 years ago
parent 36c04a74ec
commit 41b36a491d

@ -245,6 +245,10 @@ bool TagDMRData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId
parrotFrame.dstId = dstId;
m_parrotFrames.push_back(parrotFrame);
if (m_network->m_parrotOnlyOriginating) {
return true; // end here because parrot calls should never repeat anywhere
}
}
// process CSBK from peer

@ -215,6 +215,10 @@ bool TagNXDNData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerI
parrotFrame.dstId = dstId;
m_parrotFrames.push_back(parrotFrame);
if (m_network->m_parrotOnlyOriginating) {
return true; // end here because parrot calls should never repeat anywhere
}
}
// repeat traffic to the connected peers

@ -279,6 +279,10 @@ bool TagP25Data::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId
parrotFrame.dstId = dstId;
m_parrotFrames.push_back(parrotFrame);
if (m_network->m_parrotOnlyOriginating) {
return true; // end here because parrot calls should never repeat anywhere
}
}
// process TSDU from peer
@ -458,10 +462,15 @@ void TagP25Data::playbackParrot()
uint32_t messageLength = 0U;
UInt8Array message = m_network->createP25_TDUMessage(messageLength, control, lsd, controlByte);
if (message != nullptr) {
// repeat traffic to the connected peers
for (auto peer : m_network->m_peers) {
LogMessage(LOG_NET, "P25, Parrot Grant Demand, peer = %u, srcId = %u, dstId = %u", peer.first, srcId, dstId);
m_network->writePeer(peer.first, { NET_FUNC::PROTOCOL, NET_SUBFUNC::PROTOCOL_SUBFUNC_P25 }, message.get(), messageLength, 0U, false);
if (m_network->m_parrotOnlyOriginating) {
LogMessage(LOG_NET, "P25, Parrot Grant Demand, peer = %u, srcId = %u, dstId = %u", pkt.peerId, srcId, dstId);
m_network->writePeer(pkt.peerId, { NET_FUNC::PROTOCOL, NET_SUBFUNC::PROTOCOL_SUBFUNC_P25 }, message.get(), messageLength, 0U, false);
} else {
// repeat traffic to the connected peers
for (auto peer : m_network->m_peers) {
LogMessage(LOG_NET, "P25, Parrot Grant Demand, peer = %u, srcId = %u, dstId = %u", peer.first, srcId, dstId);
m_network->writePeer(peer.first, { NET_FUNC::PROTOCOL, NET_SUBFUNC::PROTOCOL_SUBFUNC_P25 }, message.get(), messageLength, 0U, false);
}
}
}
}

Loading…
Cancel
Save

Powered by TurnKey Linux.