From af321de3ec3fb1e3407b2e58a2812df8ef180623 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Wed, 20 Feb 2019 18:47:01 -0700 Subject: [PATCH] ignore duplicate voice packets --- QnetGateway.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/QnetGateway.cpp b/QnetGateway.cpp index 50d40c3..9a29502 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -1138,8 +1138,13 @@ void CQnetGateway::ProcessG2(const ssize_t g2buflen, const SDSVT &g2buf, const b } } - lastctrl = (0x3F & g2buf.ctrl); - Gate2Modem[i].Write(g2buf.title, 27); + if (lastctrl == (0x3FU && g2buf.ctrl)) { + if (LOG_DEBUG) + fprintf(stderr, "Warning: Duplicate voice packet, ignoring\n"); + } else { + lastctrl = (0x3FU & g2buf.ctrl); + Gate2Modem[i].Write(g2buf.title, 27); + } /* timeit */ time(&toRptr[i].last_time);