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:
Simon Redman 2024-06-10 20:59:03 +00:00
parent 11ef11c0c3
commit a6fd9f9e9e

View file

@ -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();