From 38bce6de0456fc1dfd86ab87b2243cb3ae41d314 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Tue, 23 Jul 2024 08:06:59 -0400 Subject: [PATCH] fixup V.24 TSBK data offset; correct situation where ACL lists for a host would repeatedly be sent because the last update time was never changed (this could happen if the peer is in progress for traffic, if thats the case just ignore sending updates and wait till next interval to send them); --- src/common/p25/dfsi/frames/MotTSBKFrame.cpp | 4 ++-- src/fne/network/FNENetwork.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/p25/dfsi/frames/MotTSBKFrame.cpp b/src/common/p25/dfsi/frames/MotTSBKFrame.cpp index 03b91e60..f302d30e 100644 --- a/src/common/p25/dfsi/frames/MotTSBKFrame.cpp +++ b/src/common/p25/dfsi/frames/MotTSBKFrame.cpp @@ -79,7 +79,7 @@ bool MotTSBKFrame::decode(const uint8_t* data) // decode start of stream startOfStream->decode(startBuffer); - ::memcpy(tsbkData, data + 8U, P25_TSBK_LENGTH_BYTES); + ::memcpy(tsbkData, data + 7U, P25_TSBK_LENGTH_BYTES); return true; } @@ -103,6 +103,6 @@ void MotTSBKFrame::encode(uint8_t* data) // encode TSBK - scope is intentional { data[0U] = DFSIFrameType::TSBK; - ::memcpy(data + 8U, tsbkData, P25_TSBK_LENGTH_BYTES); + ::memcpy(data + 7U, tsbkData, P25_TSBK_LENGTH_BYTES); } } diff --git a/src/fne/network/FNENetwork.cpp b/src/fne/network/FNENetwork.cpp index d377e606..41f71cc6 100644 --- a/src/fne/network/FNENetwork.cpp +++ b/src/fne/network/FNENetwork.cpp @@ -859,8 +859,8 @@ void* FNENetwork::threadedNetworkRx(void* arg) dt, now); if (connection->pktLastSeq() == RTP_END_OF_CALL_SEQ) { network->peerACLUpdate(peerId); - connection->lastACLUpdate(now); } + connection->lastACLUpdate(now); } uint8_t payload[8U];