no gateway packet processing until it's up

dev
Tom Early 5 years ago
parent 94e079f9c4
commit 662b2aecc1

@ -365,9 +365,8 @@ void CQnetITAP::Run(const char *cfgfile)
break; break;
} }
if (alive && (0 == memcmp(buf, "DSVT", 4))) if (initialized && alive && (0 == memcmp(buf, "DSVT", 4)))
{ { // we won't process the incoming gateway packet if the system isn't initialized and alive
//printf("read %d bytes from QnetGateway\n", (int)len);
if (ProcessGateway(len, buf)) if (ProcessGateway(len, buf))
break; break;
} }
@ -385,12 +384,14 @@ void CQnetITAP::Run(const char *cfgfile)
{ {
CFrame frame = queue.front(); CFrame frame = queue.front();
queue.pop(); queue.pop();
if (alive) {
SendToIcom(frame.data()); SendToIcom(frame.data());
ackTimer.start(); ackTimer.start();
acknowledged = false; acknowledged = false;
} }
} }
} }
}
else // we are waiting on an acknowledgement else // we are waiting on an acknowledgement
{ {
if (ackTimer.time() >= ackwait) if (ackTimer.time() >= ackwait)

Loading…
Cancel
Save

Powered by TurnKey Linux.