From 0ec5348aeed9c218fe6b5af93da287a50b7c7ba8 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Thu, 3 Jan 2019 13:33:08 -0500 Subject: [PATCH] Fixed issue with requests being sent out of the MessageClient when udp is disabled --- mainwindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mainwindow.cpp b/mainwindow.cpp index ac49e0b..164a15c 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -10614,6 +10614,10 @@ void MainWindow::emitPTT(bool on){ void MainWindow::networkMessage(Message const &message) { + if(!m_config.udpEnabled()){ + return; + } + if(!m_config.accept_udp_requests()){ return; } @@ -10785,16 +10789,28 @@ void MainWindow::networkMessage(Message const &message) } void MainWindow::sendNetworkMessage(QString const &type, QString const &message){ + if(!m_config.udpEnabled()){ + return; + } + m_messageClient->send(Message(type, message)); } void MainWindow::sendNetworkMessage(QString const &type, QString const &message, QMap const ¶ms) { + if(!m_config.udpEnabled()){ + return; + } + m_messageClient->send(Message(type, message, params)); } void MainWindow::networkError (QString const& e) { + if(!m_config.udpEnabled()){ + return; + } + if(!m_config.accept_udp_requests()){ return; }