From b949b82146ff7c126327f952739e76f803415a7b Mon Sep 17 00:00:00 2001 From: Tom Early Date: Thu, 25 Oct 2018 07:20:16 -0700 Subject: [PATCH] moved last_beacon_time declaration out of thread loop --- QnetGateway.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QnetGateway.cpp b/QnetGateway.cpp index 00fb04a..83b0d00 100644 --- a/QnetGateway.cpp +++ b/QnetGateway.cpp @@ -2207,6 +2207,7 @@ void CQnetGateway::APRSBeaconThread() time_t last_keepalive_time; time(&last_keepalive_time); + time_t last_beacon_time = 0; /* This thread is also saying to the APRS_HOST that we are ALIVE */ while (keep_running) { if (aprs->GetSock() == -1) { @@ -2218,7 +2219,6 @@ void CQnetGateway::APRSBeaconThread() } time(&tnow); - time_t last_beacon_time = 0; if ((tnow - last_beacon_time) > (rptr.aprs_interval * 60)) { for (short int i=0; i<3; i++) { if (rptr.mod[i].desc[0] != '\0') {