add a check for RTP payload type $57 (which we deprecated) so that its essentially ignored, so people on older versions can abuse the newer software; ensure we don't try to transmit terminators for calls that didn't exist on the first place;

pull/48/head
Bryan Biedenkapp 2 years ago
parent e75caf0337
commit a4ec7fbfa8

@ -91,7 +91,8 @@ UInt8Array FrameQueue::read(int& messageLength, sockaddr_storage& address, uint3
}
// ensure payload type is correct
if (_rtpHeader.getPayloadType() != DVM_RTP_PAYLOAD_TYPE) {
if (_rtpHeader.getPayloadType() != DVM_RTP_PAYLOAD_TYPE ||
_rtpHeader.getPayloadType() != DVM_RTP_PAYLOAD_TYPE + 1U) {
LogError(LOG_NET, "FrameQueue::read(), invalid RTP payload type received from network");
return nullptr;
}

@ -138,6 +138,9 @@ bool TagDMRData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId
if (std::find_if(m_status.begin(), m_status.end(), [&](StatusMapPair x) { return (x.second.dstId == dstId && x.second.slotNo == slotNo); }) != m_status.end()) {
m_status.erase(dstId);
}
else {
return false;
}
// is this a parrot talkgroup? if so, clear any remaining frames from the buffer
lookups::TalkgroupRuleGroupVoice tg = m_network->m_tidLookup->find(dstId);

@ -108,6 +108,9 @@ bool TagNXDNData::processFrame(const uint8_t* data, uint32_t len, uint32_t peerI
if (std::find_if(m_status.begin(), m_status.end(), [&](StatusMapPair x) { return x.second.dstId == dstId; }) != m_status.end()) {
m_status.erase(dstId);
}
else {
return false;
}
// is this a parrot talkgroup? if so, clear any remaining frames from the buffer
lookups::TalkgroupRuleGroupVoice tg = m_network->m_tidLookup->find(dstId);

@ -150,6 +150,9 @@ bool TagP25Data::processFrame(const uint8_t* data, uint32_t len, uint32_t peerId
if (std::find_if(m_status.begin(), m_status.end(), [&](StatusMapPair x) { return x.second.dstId == dstId; }) != m_status.end()) {
m_status.erase(dstId);
}
else {
return false;
}
// is this a parrot talkgroup? if so, clear any remaining frames from the buffer
lookups::TalkgroupRuleGroupVoice tg = m_network->m_tidLookup->find(dstId);

Loading…
Cancel
Save

Powered by TurnKey Linux.