Add a way to disable UDP broadcasts for testing

This commit is contained in:
Albert Vaca Cintora 2023-06-22 23:22:24 +02:00
parent 34e0128fe9
commit a04d9480a4

View file

@ -145,6 +145,10 @@ void LanLinkProvider::broadcastToNetwork()
void LanLinkProvider::broadcastUdpIdentityPacket()
{
if (qEnvironmentVariableIsSet("KDECONNECT_DISABLE_UDP_BROADCAST")) {
qWarning() << "Not broadcasting UDP because KDECONNECT_DISABLE_UDP_BROADCAST is set";
return;
}
sendUdpIdentityPacket(getBroadcastAddresses());
}