Correct reference to NetworkPacket in isValidIdentityPacket calls
## 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 <snip> ``` ### After: Clean build.
This commit is contained in:
parent
11ef11c0c3
commit
a6fd9f9e9e
1 changed files with 2 additions and 2 deletions
|
@ -194,7 +194,7 @@ void BluetoothLinkProvider::clientIdentityReceived(const QBluetoothAddress &peer
|
||||||
NetworkPacket receivedPacket;
|
NetworkPacket receivedPacket;
|
||||||
bool success = NetworkPacket::unserialize(identityArray, &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";
|
qCWarning(KDECONNECT_CORE) << "BluetoothLinkProvider: Invalid identity packet received";
|
||||||
mSockets.remove(peer);
|
mSockets.remove(peer);
|
||||||
socket->close();
|
socket->close();
|
||||||
|
@ -298,7 +298,7 @@ void BluetoothLinkProvider::serverDataReceived(const QBluetoothAddress &peer, QS
|
||||||
NetworkPacket receivedPacket;
|
NetworkPacket receivedPacket;
|
||||||
bool success = NetworkPacket::unserialize(identityArray, &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";
|
qCWarning(KDECONNECT_CORE) << "BluetoothLinkProvider: Invalid identity packet received";
|
||||||
mSockets.remove(peer);
|
mSockets.remove(peer);
|
||||||
socket->close();
|
socket->close();
|
||||||
|
|
Loading…
Reference in a new issue