[backends/lan] Don't fail silently when a UDP packet could not be unserialized
This commit is contained in:
parent
ef78640caf
commit
a28059315e
1 changed files with 8 additions and 1 deletions
|
@ -183,7 +183,14 @@ void LanLinkProvider::newUdpConnection() //udpBroadcastReceived
|
|||
|
||||
//qCDebug(KDECONNECT_CORE) << "Datagram " << datagram.data() ;
|
||||
|
||||
if (!success || receivedPacket->type() != PACKET_TYPE_IDENTITY) {
|
||||
if (!success) {
|
||||
qCDebug(KDECONNECT_CORE) << "Could not unserialize UDP packet";
|
||||
delete receivedPacket;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (receivedPacket->type() != PACKET_TYPE_IDENTITY) {
|
||||
qCDebug(KDECONNECT_CORE) << "Received a UDP packet of wrong type" << receivedPacket->type();
|
||||
delete receivedPacket;
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue