Fix for remote connection IP detection

merge-requests/2/head
Phil Taylor 2021-02-12 14:46:02 +00:00
rodzic 62d0c1d681
commit 5a55d5fd3d
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -228,7 +228,7 @@ void udpHandler::DataReceived()
{
devName = parseNullTerminatedString(r, 0x40);
QHostAddress ip = QHostAddress(qFromBigEndian<quint32>(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()+")");
}