Fix glib callbacks lifecycle problems
authorPiotr Bartosiewicz <p.bartosiewi@partner.samsung.com>
Fri, 11 Apr 2014 08:58:47 +0000 (10:58 +0200)
committerJan Olszak <j.olszak@samsung.com>
Mon, 19 May 2014 11:47:15 +0000 (13:47 +0200)
commit66488434d6f1e039885070ab0615c92791f543d5
tree4311417e74d0c4b06b2b173b748c73be1ddb3656
parentbef42d83cf9186fc9b69d196756b940d69eefebc
Fix glib callbacks lifecycle problems

[Bug/Feature]   Dbus connection callbacks was called on destroyed
                connection.
[Cause]         Closing glib connection does not remove pending events
                so they can be fired in glib loop thread later.
[Solution]      Wait for all callbacks to be deleted before connection
                destructor ends.
[Verification]  Build, install, run tests.

Change-Id: Id8e1999cf5938be64493cac503fbae1015abc02e
common/dbus/connection.cpp
common/dbus/connection.hpp
common/utils/callback-guard.cpp [new file with mode: 0644]
common/utils/callback-guard.hpp [new file with mode: 0644]
common/utils/callback-wrapper.hpp [new file with mode: 0644]
unit_tests/utils/ut-callback-guard.cpp [new file with mode: 0644]