D28520: Fix lifetime of slot in KIO-MTP

Alexander Saoutkin noreply at phabricator.kde.org
Thu Apr 2 17:17:28 BST 2020


feverfew created this revision.
feverfew added reviewers: akrutzler, dfaure, elvisangelaccio.
Herald added projects: Dolphin, Frameworks.
Herald added subscribers: kfm-devel, kde-frameworks-devel.
feverfew requested review of this revision.

REVISION 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.

REPOSITORY
  R320 KIO Extras

BRANCH
  slotLifetime (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D28520

AFFECTED FILES
  mtp/kio_mtp.cpp

To: feverfew, akrutzler, dfaure, elvisangelaccio
Cc: kde-frameworks-devel, kfm-devel, fvogt, nikolaik, pberestov, iasensio, fprice, LeGast00n, cblack, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200402/67d2c75d/attachment.html>


More information about the Kde-frameworks-devel mailing list