From 4831ba8829e5dc7b7481febf5f638bc2b2644b60 Mon Sep 17 00:00:00 2001 From: LX3JL Date: Wed, 10 Feb 2016 19:41:53 +0100 Subject: [PATCH] xlxd version 1.1.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * added connection compatibility with KI4LKF’s dxrfd --- src/cdextraprotocol.cpp | 24 +++++++++++++++++++++--- src/main.h | 2 +- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/cdextraprotocol.cpp b/src/cdextraprotocol.cpp index 9ca8f2d..2101296 100644 --- a/src/cdextraprotocol.cpp +++ b/src/cdextraprotocol.cpp @@ -401,9 +401,27 @@ void CDextraProtocol::EncodeKeepAlivePacket(CBuffer *Buffer) void CDextraProtocol::EncodeConnectAckPacket(CBuffer *Buffer) { - uint8 tag[] = { 'A','C','K',0 }; - Buffer->resize(Buffer->size()-1); - Buffer->Append(tag, sizeof(tag)); + uint8 xrf[] = { 'X','R','F' }; + + // is it for a XRF or repeater + if ( Buffer->Compare(xrf, sizeof(xrf)) == 0 ) + { + // XRFxxx + uint8 rm = (Buffer->data())[8]; + uint8 lm = (Buffer->data())[9]; + Buffer->clear(); + Buffer->Set((uint8 *)(const char *)GetReflectorCallsign(), CALLSIGN_LEN); + Buffer->Append(lm); + Buffer->Append(rm); + Buffer->Append((uint8)0); + } + else + { + // regular repeater + uint8 tag[] = { 'A','C','K',0 }; + Buffer->resize(Buffer->size()-1); + Buffer->Append(tag, sizeof(tag)); + } } void CDextraProtocol::EncodeConnectNackPacket(CBuffer *Buffer) diff --git a/src/main.h b/src/main.h index 5a8ed5e..702f276 100644 --- a/src/main.h +++ b/src/main.h @@ -48,7 +48,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 1 -#define VERSION_REVISION 2 +#define VERSION_REVISION 3 // global ------------------------------------------------------