Fix lifetime of slot in KIO-MTP

Authored by feverfew on Apr 2 2020, 4:16 PM.

Description

Fix lifetime of slot in KIO-MTP

Summary:
This slot was incorrectly made to last the lifetime of the slave. In fact, this
slot should only be live for the lifetime of the event loop (one I/O operation).

This can cause issues with the data being emitted for data from other IO
operations. By making it live in the lifetime of the local event loop this
scenario cannot occur as LIBMTP only allows one operation at a time.

Test Plan:
Via the use of KIOFuse (as this is where the bug was noticed).
Before: Opening a file for the first time worked. Subsequent opens would fail
due to garbage output After: Opening any number of files at any time works.

Reviewers: akrutzler, dfaure, elvisangelaccio

Subscribers: kde-frameworks-devel, kfm-devel, fvogt

Tags: Dolphin, Frameworks

Differential Revision: https://phabricator.kde.org/D28520

Details

Committed
feverfewApr 7 2020, 6:22 PM
Differential Revision
D28520: Fix lifetime of slot in KIO-MTP
Parents
R320:f40191a147c9: smb: add hack to support spaces in workgroup names
Branches
Unknown
Tags
Unknown