ensure first super-frame LDU1 after an HDU sets the encrypt flag;

82-dvmbridge---implement-notch-filter-for-2175hz-trc-guard-tone
Bryan Biedenkapp 1 year ago
parent cb309fdb0f
commit 9e68049cd8

@ -195,6 +195,7 @@ bool Voice::process(uint8_t* data, uint32_t len)
m_lastDUID = DUID::LDU1; m_lastDUID = DUID::LDU1;
bool alreadyDecoded = false; bool alreadyDecoded = false;
bool hduEncrypt = false;
FrameType::E frameType = FrameType::DATA_UNIT; FrameType::E frameType = FrameType::DATA_UNIT;
ulong64_t rsValue = 0U; ulong64_t rsValue = 0U;
if (m_p25->m_rfState == RS_RF_LISTENING) { if (m_p25->m_rfState == RS_RF_LISTENING) {
@ -392,6 +393,7 @@ bool Voice::process(uint8_t* data, uint32_t len)
m_rfLC = lc; m_rfLC = lc;
m_rfLastLDU1 = m_rfLC; m_rfLastLDU1 = m_rfLC;
hduEncrypt = encrypted;
m_lastRejectId = 0U; m_lastRejectId = 0U;
::ActivityLog("P25", true, "RF %svoice transmission from %u to %s%u", encrypted ? "encrypted ": "", srcId, group ? "TG " : "", dstId); ::ActivityLog("P25", true, "RF %svoice transmission from %u to %s%u", encrypted ? "encrypted ": "", srcId, group ? "TG " : "", dstId);
@ -660,6 +662,10 @@ bool Voice::process(uint8_t* data, uint32_t len)
m_rfLastLDU1 = m_rfLC; m_rfLastLDU1 = m_rfLC;
} }
} }
else {
// this might be the first LDU1 -- set the encryption flag if necessary
m_rfLC.setEncrypted(hduEncrypt);
}
m_inbound = true; m_inbound = true;

Loading…
Cancel
Save

Powered by TurnKey Linux.