Fix receiving payloads using a bluetooth connection
ClosedPublic

Authored by mtijink on Apr 12 2018, 5:06 PM.

Details

Summary

This fixes receiving payloads using the bluetooth backend.

This looks like some bug in Qt, but I couldn't figure out what happens exactly (will report a bug though).

Test Plan

Receiving files now works!

Diff Detail

Repository
R224 KDE Connect
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mtijink created this revision.Apr 12 2018, 5:06 PM
Restricted Application added a project: KDE Connect. · View Herald TranscriptApr 12 2018, 5:06 PM
mtijink requested review of this revision.Apr 12 2018, 5:06 PM
apol added a subscriber: apol.Apr 13 2018, 12:28 PM
apol added inline comments.
core/backends/bluetooth/bluetoothdownloadjob.cpp
38–39

Will it still get deleted now?

core/filetransferjob.cpp
44

Just remove it, or do a || is bluetooth somehow.

Did you file a Qt bug?

Sometimes it works fine, but sometimes it fails immediately after start with this on logcat

04-17 01:05:56.433 29431-14096/org.kde.kdeconnect_tp W/System.err:     at android.bluetooth.BluetoothSocket.accept(BluetoothSocket.java:465)
        at android.bluetooth.BluetoothServerSocket.accept(BluetoothServerSocket.java:158)
        at android.bluetooth.BluetoothServerSocket.accept(BluetoothServerSocket.java:144)
        at org.kde.kdeconnect.Backends.BluetoothBackend.BluetoothLink.sendPacketInternal(BluetoothLink.java:203)
        at org.kde.kdeconnect.Backends.BluetoothBackend.BluetoothLink.sendPacket(BluetoothLink.java:164)
        at org.kde.kdeconnect.Device.sendPacketBlocking(Device.java:670)
        at org.kde.kdeconnect.Plugins.SharePlugin.SharePlugin$2.run(SharePlugin.java:311)
        at java.lang.Thread.run(Thread.java:764)

After it occured once all following transfers fail as well

Did you file a Qt bug?

Yes. Turns out I forgot to submit my earlier reply -_-

core/backends/bluetooth/bluetoothdownloadjob.cpp
38–39

It doesn't :-(

Then again, it didn't get destroyed earlier either (the transfer just hung). I think I'll wait a bit to see what happens on Qt bug 67672.

apol accepted this revision.Jul 26 2018, 5:43 PM

Sounds like we can get it in no?

This revision is now accepted and ready to land.Jul 26 2018, 5:43 PM
Restricted Application added a subscriber: kdeconnect. · View Herald TranscriptJul 26 2018, 5:43 PM
This revision was automatically updated to reflect the committed changes.