From 5a55d5fd3d29d7f093d3038f8dc7f604c980fbb6 Mon Sep 17 00:00:00 2001 From: Phil Taylor Date: Fri, 12 Feb 2021 14:46:02 +0000 Subject: [PATCH] Fix for remote connection IP detection --- udphandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udphandler.cpp b/udphandler.cpp index 0bc818d..c1b9847 100644 --- a/udphandler.cpp +++ b/udphandler.cpp @@ -228,7 +228,7 @@ void udpHandler::DataReceived() { devName = parseNullTerminatedString(r, 0x40); QHostAddress ip = QHostAddress(qFromBigEndian(r.mid(0x84, 4))); - if (parseNullTerminatedString(r, 0x64) != compName) // || ip != localIP ) // TODO: More testing of IP address detection code! + if (!ip.isEqual(QHostAddress("0.0.0.0")) && parseNullTerminatedString(r, 0x64) != compName) // || ip != localIP ) // TODO: More testing of IP address detection code! { emit haveNetworkStatus("Radio in use by: " + QString::fromUtf8(parseNullTerminatedString(r, 0x64))+" ("+ip.toString()+")"); }