diff --git a/QnetLink.cpp b/QnetLink.cpp index 882ffa8..d980a7c 100644 --- a/QnetLink.cpp +++ b/QnetLink.cpp @@ -1522,7 +1522,7 @@ void CQnetLink::ProcessXRF(unsigned char *buf, const int length) memcpy(rdsvt.dsvt.title, dsvt.title, 27); if (32U == rdsvt.head[0]) - memcpy(rdsvt.dsvt.vend.end, endbytes, 6); + memcpy(rdsvt.dsvt.vend.textend, endbytes, 6); REFWrite(rdsvt.head, rdsvt.head[0], inbound->addr); } @@ -1571,7 +1571,7 @@ void CQnetLink::ProcessXRF(unsigned char *buf, const int length) memcpy(rdsvt.dsvt.title, dsvt.title, 27); if (32U == rdsvt.head[0]) - memcpy(rdsvt.dsvt.vend.end, endbytes, 6); + memcpy(rdsvt.dsvt.vend.textend, endbytes, 6); REFWrite(rdsvt.head, rdsvt.head[0], to_remote_g2[i].addr); } else if (to_remote_g2[i].addr.GetPort() == rmt_dcs_port) @@ -1749,7 +1749,7 @@ void CQnetLink::ProcessDCS(unsigned char *dcs_buf, const int length) rdsvt.dsvt.ctrl = dcs_buf[45]; memcpy(rdsvt.dsvt.vasd.voice, dcs_buf+46, 12); if (dcs_buf[45] & 0x40U) - memcpy(rdsvt.dsvt.vend.end, endbytes, 6); + memcpy(rdsvt.dsvt.vend.textend, endbytes, 6); /* send the data to the local gateway/repeater */ ToGate.Write(rdsvt.dsvt.title, 27); @@ -3223,7 +3223,7 @@ void CQnetLink::Process() memcpy(rdsvt.dsvt.title, dsvt.title, 27); if (dsvt.ctrl & 0x40U) - memcpy(rdsvt.dsvt.vend.end, endbytes, 6); + memcpy(rdsvt.dsvt.vend.textend, endbytes, 6); if (inbound_list.size() > 0) { diff --git a/QnetRelay.cpp b/QnetRelay.cpp index 756510d..803f7db 100644 --- a/QnetRelay.cpp +++ b/QnetRelay.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018,2020 by Thomas A. Early N7TAE + * Copyright (C) 2018-2021 by Thomas A. Early N7TAE * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -36,7 +36,7 @@ #include "QnetTypeDefs.h" #include "QnetConfigure.h" -#define RELAY_VERSION "QnetRelay-526" +#define RELAY_VERSION "210408" CQnetRelay::CQnetRelay(int mod) : assigned_module(mod), @@ -293,7 +293,7 @@ bool CQnetRelay::ProcessMMDVM(const int len, const unsigned char *raw) if (len < 65) ::memcpy(dsrp.title, raw, len); // transfer raw data to SDSRP struct - if (49==len || 21==len) + if (49==len || 21==len || len==24) { // grab the stream id if this is a header if (49 == len) @@ -338,10 +338,10 @@ bool CQnetRelay::ProcessMMDVM(const int len, const unsigned char *raw) if (log_qso) printf("Sent DSVT streamid=%04x ur=%.8s r1=%.8s r2=%.8s my=%.8s/%.4s\n", ntohs(dsvt.streamid), dsvt.hdr.urcall, dsvt.hdr.rpt1, dsvt.hdr.rpt2, dsvt.hdr.mycall, dsvt.hdr.sfx); } - else if (21 == len) // ambe + else // ambe { dsvt.ctrl = dsrp.header.seq; - memcpy(dsvt.vasd.voice, dsrp.voice.ambe, 12); + memcpy(dsvt.vasd.voice, dsrp.voice.ambe, (21==len)?12:15); if (ToGate.Write(dsvt.title, 27)) { @@ -442,7 +442,7 @@ int main(int argc, const char **argv) if ('-' == argv[1][0]) { - printf("\nQnetRelay Version #%s Copyright (C) 2018-2019 by Thomas A. Early N7TAE\n", RELAY_VERSION); + printf("\nQnetRelay Version #%s Copyright (C) 2018-2021 by Thomas A. Early N7TAE\n", RELAY_VERSION); printf("QnetRelay comes with ABSOLUTELY NO WARRANTY; see the LICENSE for details.\n"); printf("This is free software, and you are welcome to distribute it\nunder certain conditions that are discussed in the LICENSE file.\n\n"); return 0; diff --git a/QnetTypeDefs.h b/QnetTypeDefs.h index 633a871..da09f5e 100644 --- a/QnetTypeDefs.h +++ b/QnetTypeDefs.h @@ -1,6 +1,6 @@ #pragma once /* - * Copyright 2017-2020 by Thomas Early, N7TAE + * Copyright 2017-2021 by Thomas Early, N7TAE * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -102,8 +102,8 @@ using SDSVT = struct dsvt_tag } vasd; // voice and slow data total 27 struct { - unsigned char voice[9]; // 15 - unsigned char end[6]; // 24 + unsigned char voice[9]; // 15 + unsigned char textend[6]; // 24 } vend; // voice and end seq total 32 (for DPlus) }; }; @@ -142,6 +142,14 @@ using SDSRP = struct dsrp_tag // offset size unsigned char err; // # of errors? 8 unsigned char ambe[12]; // voice + slow data 9 21 } voice; + struct + { + unsigned short id; // random id number 5 + unsigned char seq; // sequence from 0 to 0x14 7 + // if end then sequence |= 0x40 + unsigned char err; // # of errors? 8 + unsigned char ambe[15]; // voice + slow data 9 24 + } endvoice; }; }; #pragma pack(pop)