From 662b2aecc114009a22c85b7aa7ad54acbce2dc18 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Mon, 14 Sep 2020 12:27:45 -0700 Subject: [PATCH] no gateway packet processing until it's up --- QnetITAP.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/QnetITAP.cpp b/QnetITAP.cpp index 243137a..53ac25f 100644 --- a/QnetITAP.cpp +++ b/QnetITAP.cpp @@ -365,9 +365,8 @@ void CQnetITAP::Run(const char *cfgfile) break; } - if (alive && (0 == memcmp(buf, "DSVT", 4))) - { - //printf("read %d bytes from QnetGateway\n", (int)len); + if (initialized && alive && (0 == memcmp(buf, "DSVT", 4))) + { // we won't process the incoming gateway packet if the system isn't initialized and alive if (ProcessGateway(len, buf)) break; } @@ -385,9 +384,11 @@ void CQnetITAP::Run(const char *cfgfile) { CFrame frame = queue.front(); queue.pop(); - SendToIcom(frame.data()); - ackTimer.start(); - acknowledged = false; + if (alive) { + SendToIcom(frame.data()); + ackTimer.start(); + acknowledged = false; + } } } }