From a6fd9f9e9e7271942ca36a0883e901670c75a636 Mon Sep 17 00:00:00 2001 From: Simon Redman Date: Mon, 10 Jun 2024 20:59:03 +0000 Subject: [PATCH] Correct reference to NetworkPacket in isValidIdentityPacket calls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Fix Bluetooth branch build errors for changes in !678 ## Test Plan ### Before: Build errors in bluetoothlinkprovider.cpp due to undefined variable and due to incorrect argument type. ``` /home/simon/src/kdeconnect-kde/core/backends/bluetooth/bluetoothlinkprovider.cpp:301:56: error: cann ot convert ‘NetworkPacket’ to ‘NetworkPacket*’ 301 | if (!success || !DeviceInfo::isValidIdentityPacket(receivedPacket)) { | ^~~~~~~~~~~~~~ | | | NetworkPacket ``` ### After: Clean build. --- core/backends/bluetooth/bluetoothlinkprovider.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/backends/bluetooth/bluetoothlinkprovider.cpp b/core/backends/bluetooth/bluetoothlinkprovider.cpp index b1891016a..4c587d505 100644 --- a/core/backends/bluetooth/bluetoothlinkprovider.cpp +++ b/core/backends/bluetooth/bluetoothlinkprovider.cpp @@ -194,7 +194,7 @@ void BluetoothLinkProvider::clientIdentityReceived(const QBluetoothAddress &peer NetworkPacket receivedPacket; bool success = NetworkPacket::unserialize(identityArray, &receivedPacket); - if (!success || !DeviceInfo::isValidIdentityPacket(np)) { + if (!success || !DeviceInfo::isValidIdentityPacket(&receivedPacket)) { qCWarning(KDECONNECT_CORE) << "BluetoothLinkProvider: Invalid identity packet received"; mSockets.remove(peer); socket->close(); @@ -298,7 +298,7 @@ void BluetoothLinkProvider::serverDataReceived(const QBluetoothAddress &peer, QS NetworkPacket receivedPacket; bool success = NetworkPacket::unserialize(identityArray, &receivedPacket); - if (!success || !DeviceInfo::isValidIdentityPacket(receivedPacket)) { + if (!success || !DeviceInfo::isValidIdentityPacket(&receivedPacket)) { qCWarning(KDECONNECT_CORE) << "BluetoothLinkProvider: Invalid identity packet received"; mSockets.remove(peer); socket->close();