1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-21 00:09:47 +01:00

Ignore Zeroconf messages sent by ourselves

This commit is contained in:
Uwe L. Korn 2013-04-05 17:54:32 +02:00
parent 248a87ccce
commit 14af3aedd6

View File

@ -29,6 +29,7 @@
#include <QList>
#include <QHostAddress>
#include <QHostInfo>
#include <QNetworkInterface>
#include <QNetworkProxy>
#include <QUdpSocket>
#include <QTimer>
@ -131,6 +132,10 @@ private slots:
m_sock.readDatagram( datagram.data(), datagram.size(), &sender, &senderPort );
qDebug() << "DATAGRAM RCVD" << QString::fromLatin1( datagram ) << sender;
// Ignore our own requests
if ( QNetworkInterface::allAddresses().contains( sender ) )
return;
// only process msgs originating on the LAN:
if ( datagram.startsWith( "TOMAHAWKADVERT:" ) &&
Servent::isIPWhitelisted( sender ) )