add messaging to indicate a failure to decode the PDU Trellis; fix a check in TrunkPacket::process;

pull/12/head
Bryan Biedenkapp 4 years ago
parent fa86cb9677
commit 2b556578c3

@ -191,7 +191,7 @@ bool TrunkPacket::process(uint8_t* data, uint32_t len, bool blockData)
m_p25->m_queue.clear();
// special case to avoid resetting the TSBK state and handle MBTs (this is a horrible hack)
if (len != 1U && !blockData) {
if (len > 1U && !blockData) {
resetRF();
}
resetNet();
@ -768,7 +768,7 @@ bool TrunkPacket::processMBT(DataHeader dataHeader, DataBlock* blocks)
for (uint32_t i = 0; i < dataHeader.getBlocksToFollow(); i++) {
bool decodeRet = m_rfTSBK.decodeMBT(dataHeader, blocks[i]);
if (decodeRet) {
process(data, 0U, true);
process(data, 1U, true);
} else {
ret = false;
}

@ -87,6 +87,7 @@ bool DataBlock::decode(const uint8_t* data, const DataHeader header)
m_confirmed = true;
bool valid = m_trellis.decode34(data, buffer);
if (!valid) {
LogError(LOG_P25, "DataBlock::decode(), failed to decode Trellis 3/4 rate coding");
return false;
}
@ -139,6 +140,7 @@ bool DataBlock::decode(const uint8_t* data, const DataHeader header)
m_confirmed = false;
bool valid = m_trellis.decode12(data, buffer);
if (!valid) {
LogError(LOG_P25, "DataBlock::decode(), failed to decode Trellis 1/2 rate coding");
return false;
}

@ -312,6 +312,7 @@ bool TSBK::decode(const uint8_t* data)
}
}
}
if (!ret)
return false;
}

Loading…
Cancel
Save

Powered by TurnKey Linux.