[backends/lan] Don't fail silently when a UDP packet could not be unserialized
This commit is contained in:
parent
137d504b58
commit
eef04f124b
1 changed files with 8 additions and 1 deletions
|
@ -185,7 +185,14 @@ void LanLinkProvider::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