From 80c07c7026892b71572658aec8287ec6919ed184 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Thu, 24 Oct 2019 13:01:13 -0700 Subject: [PATCH 1/3] reprogram r1/2 if they are DIRECT --- QnetGateway.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/QnetGateway.cpp b/QnetGateway.cpp index 341d9e8..b877e59 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -1287,6 +1287,24 @@ void CQnetGateway::ProcessModem() if (recvlen == 56) { if (LOG_QSO) printf("id=%04x start RPTR flag0=%02x ur=%.8s r1=%.8s r2=%.8s my=%.8s/%.4s\n", ntohs(dsvt.streamid), dsvt.hdr.flag[0], dsvt.hdr.urcall, dsvt.hdr.rpt1, dsvt.hdr.rpt2, dsvt.hdr.mycall, dsvt.hdr.sfx); + if (0==memcmp(dsvt.hdr.rpt1, "DIRECT ", 8) && 0==memcmp(dsvt.hdr.rpt2, "DIRECT ", 8)) { // DIRECT mode??? + memcpy(dsvt.hdr.rpt1, OWNER.c_str(), 7); + switch (dsvt.flagb[2]) { + case 0x01U: + dsvt.hdr.rpt1[7] = 'B'; + break; + case 0x02U: + dsvt.hdr.rpt1[7] = 'C'; + break; + default: + dsvt.hdr.rpt1[7] = 'A'; + break; + } + memcpy(dsvt.hdr.rpt2, OWNER.c_str(), 7); + dsvt.hdr.rpt2[7] = 'G'; + if (LOG_QSO) + printf("Resetting: r1=%.8s r2=%.8s\n", dsvt.hdr.rpt1, dsvt.hdr.rpt2); + } if (0==memcmp(dsvt.hdr.rpt1, OWNER.c_str(), 7) && Flag_is_ok(dsvt.hdr.flag[0])) { From 2d69dde51cdb6994e5b39139218594f4352f0600 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Fri, 25 Oct 2019 09:05:42 -0700 Subject: [PATCH 2/3] added pf checksum to DIRECT headerframe repair --- QnetGateway.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/QnetGateway.cpp b/QnetGateway.cpp index b877e59..516f9b3 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -1302,6 +1302,7 @@ void CQnetGateway::ProcessModem() } memcpy(dsvt.hdr.rpt2, OWNER.c_str(), 7); dsvt.hdr.rpt2[7] = 'G'; + calcPFCS(dsvt.title, 56); if (LOG_QSO) printf("Resetting: r1=%.8s r2=%.8s\n", dsvt.hdr.rpt1, dsvt.hdr.rpt2); } From dccef6431b80e951da615e9768c3d8ef2cb341d2 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Fri, 25 Oct 2019 12:10:37 -0700 Subject: [PATCH 3/3] fixed carriage-return in XLX Host file --- qnadmin | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qnadmin b/qnadmin index 8582a44..f0ea8ed 100755 --- a/qnadmin +++ b/qnadmin @@ -472,7 +472,7 @@ GatewayMenu () { wget http://www.pistar.uk/downloads/DCS_Hosts.txt /bin/rm -f gwys.txt echo "# Downloaded from www.pistar.uk and xlxapi.rlx.lu `date`" > gwys.txt - awk '$1 ~ /^XLX/ { printf "%s %s 30001\n", $1, $2 }' XLX_Hosts.txt >> gwys.txt + awk '$1 ~ /^XLX/ { gsub("\r", ""); printf "%s %s 30001\n", $1, $2 }' XLX_Hosts.txt >> gwys.txt awk '$1 ~ /^XRF/ { printf "%s %s 30001\n", $1, $2 }' DExtra_Hosts.txt >> gwys.txt awk '$1 ~ /^DCS/ { printf "%s %s 30051\n", $1, $2 }' DCS_Hosts.txt >> gwys.txt awk '$1 ~ /^REF/ { printf "%s %s 20001\n", $1, $2 }' DPlus_Hosts.txt >> gwys.txt