diff --git a/src/common/p25/lc/tsbk/IOSP_EXT_FNCT.cpp b/src/common/p25/lc/tsbk/IOSP_EXT_FNCT.cpp index e048c319..d18ebb35 100644 --- a/src/common/p25/lc/tsbk/IOSP_EXT_FNCT.cpp +++ b/src/common/p25/lc/tsbk/IOSP_EXT_FNCT.cpp @@ -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; } diff --git a/src/host/p25/packet/ControlSignaling.cpp b/src/host/p25/packet/ControlSignaling.cpp index 8bc7f2bb..417a733f 100644 --- a/src/host/p25/packet/ControlSignaling.cpp +++ b/src/host/p25/packet/ControlSignaling.cpp @@ -483,18 +483,18 @@ bool ControlSignaling::process(uint8_t* data, uint32_t len, std::unique_ptr(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: