From 32fcabd2af71c21a3b7d0362f6e48a8bac1f3dd0 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Sat, 24 Aug 2019 15:27:12 -0400 Subject: [PATCH] Prevent connecting to APRSIS server if there's no host or port provided --- APRSISClient.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/APRSISClient.cpp b/APRSISClient.cpp index 87d74fd..16139a5 100644 --- a/APRSISClient.cpp +++ b/APRSISClient.cpp @@ -242,6 +242,13 @@ void APRSISClient::processQueue(bool disconnect){ // don't process queue if there's nothing to process if(m_frameQueue.isEmpty()) return; + // don't process queue if there's no host + if(m_host.isEmpty() || m_port == 0){ + // no host, so let's clear the queue and exit + m_frameQueue.clear(); + return; + } + // 1. connect (and read) // 2. login (and read) // 3. for each raw frame in queue, send