[Kde-hardware-devel] Review Request: Fix race condition in UDisks backend
Alex Merry
kde at randomguy3.me.uk
Thu Nov 18 02:29:46 CET 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5894/
-----------------------------------------------------------
Review request for Solid and Lukáš Tinkl.
Summary
-------
If UDevManager is instantiated, then UDisks sends a DeviceAdded signal, then someone calls a method that makes use of deviceCache(), the device cache will never be populated.
The reason is that the DeviceAdded signal will add the new device to the empty cache, then deviceCache() will assume the cache has been populated, as it is not empty.
This patch simply makes sure that DeviceAdded (and DeviceChanged) don't add anything to an empty cache. If the cache is empty, deviceCache() will populate it anyway. The signals are still forwarded, however, as expected.
Diffs
-----
/trunk/KDE/kdelibs/solid/solid/backends/udisks/udisksmanager.cpp 1198261
Diff: http://svn.reviewboard.kde.org/r/5894/diff
Testing
-------
Thanks,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20101118/a9eed025/attachment.htm
More information about the Kde-hardware-devel
mailing list