fix issue where when *decoding* a EXT_FNCT the src and dst would be inverted resulting in bad logging;

4.01b_maint
Bryan Biedenkapp 2 years ago
parent 89f255d8e3
commit 4ba65c5bab

@ -45,8 +45,8 @@ bool IOSP_EXT_FNCT::decode(const uint8_t* data, bool rawTSBK)
ulong64_t tsbkValue = TSBK::toValue(tsbk);
m_extendedFunction = (uint32_t)((tsbkValue >> 48) & 0xFFFFU); // Extended Function
m_dstId = (uint32_t)((tsbkValue >> 24) & 0xFFFFFFU); // Argument
m_srcId = (uint32_t)(tsbkValue & 0xFFFFFFU); // Target Radio Address
m_srcId = (uint32_t)((tsbkValue >> 24) & 0xFFFFFFU); // Argument
m_dstId = (uint32_t)(tsbkValue & 0xFFFFFFU); // Target Radio Address
return true;
}

@ -483,18 +483,18 @@ bool ControlSignaling::process(uint8_t* data, uint32_t len, std::unique_ptr<lc::
IOSP_EXT_FNCT* iosp = static_cast<IOSP_EXT_FNCT*>(tsbk.get());
if (m_verbose) {
LogMessage(LOG_RF, P25_TSDU_STR ", %s, op = $%02X, arg = %u, tgt = %u",
tsbk->toString(true).c_str(), iosp->getExtendedFunction(), dstId, srcId);
tsbk->toString(true).c_str(), iosp->getExtendedFunction(), srcId, dstId);
}
// generate activity log entry
if (iosp->getExtendedFunction() == ExtendedFunctions::CHECK_ACK) {
::ActivityLog("P25", true, "radio check response from %u to %u", dstId, srcId);
::ActivityLog("P25", true, "radio check response from %u to %u", srcId, dstId);
}
else if (iosp->getExtendedFunction() == ExtendedFunctions::INHIBIT_ACK) {
::ActivityLog("P25", true, "radio inhibit response from %u to %u", dstId, srcId);
::ActivityLog("P25", true, "radio inhibit response from %u to %u", srcId, dstId);
}
else if (iosp->getExtendedFunction() == ExtendedFunctions::UNINHIBIT_ACK) {
::ActivityLog("P25", true, "radio uninhibit response from %u to %u", dstId, srcId);
::ActivityLog("P25", true, "radio uninhibit response from %u to %u", srcId, dstId);
}
writeRF_TSDU_SBF(iosp, true);
@ -911,6 +911,17 @@ bool ControlSignaling::processNetwork(uint8_t* data, uint32_t len, lc::LC& contr
LogMessage(LOG_NET, P25_TSDU_STR ", %s, serviceType = $%02X, arg = %u, tgt = %u",
tsbk->toString(true).c_str(), iosp->getService(), srcId, dstId);
}
// generate activity log entry
if (iosp->getExtendedFunction() == ExtendedFunctions::CHECK_ACK) {
::ActivityLog("P25", false, "radio check response from %u to %u", srcId, dstId);
}
else if (iosp->getExtendedFunction() == ExtendedFunctions::INHIBIT_ACK) {
::ActivityLog("P25", false, "radio inhibit response from %u to %u", srcId, dstId);
}
else if (iosp->getExtendedFunction() == ExtendedFunctions::UNINHIBIT_ACK) {
::ActivityLog("P25", false, "radio uninhibit response from %u to %u", srcId, dstId);
}
}
break;
case TSBKO::ISP_EMERG_ALRM_REQ:

Loading…
Cancel
Save

Powered by TurnKey Linux.