From 4ea0674be4b59340f94e0cf8131cb93fef8ae1b8 Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Fri, 1 Jul 2016 14:27:25 +0100 Subject: [PATCH] Fix the Wires-X sequence numbers. --- YSFGateway/WiresX.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/YSFGateway/WiresX.cpp b/YSFGateway/WiresX.cpp index 4197c4b..8653e12 100644 --- a/YSFGateway/WiresX.cpp +++ b/YSFGateway/WiresX.cpp @@ -338,7 +338,8 @@ void CWiresX::createReply(const unsigned char* data, unsigned int length) payload.writeDataFRModeData1(m_csd1, buffer + 35U); payload.writeDataFRModeData2(m_csd2, buffer + 35U); - buffer[34U] = seqNo++; + buffer[34U] = seqNo; + seqNo *= 2U; m_network->write(buffer); @@ -385,7 +386,8 @@ void CWiresX::createReply(const unsigned char* data, unsigned int length) fich.setBN(bn); fich.encode(buffer + 35U); - buffer[34U] = seqNo++; + buffer[34U] = seqNo; + seqNo *= 2U; m_network->write(buffer);