Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[dbus] Improve SystemBus connection management. MER#1694
D-Bus SystemBus connection is made from several places. Explicitly from the main() and implicitly from various modules that do ipc with other components. This makes it hard to tell when connection actually gets made, process wide dbus initialization happens in the wrong place and setting up signal matches is delayed by the synchronous initialization activity during startup. Move dbus_threads_init_default() to more appropriate place so that it actually is the first libdbus call that gets made. Handle connecting to SystemBus and installing signal listeners as early as possible and claim usb-moded service name separately when usb-moded is ready to process requests made over D-Bus. Add usb_moded_dbus_get_connection() function that other modules can use to get reference to the SystemBus connection when/if one has been made from the main logic. Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
- Loading branch information
Showing
3 changed files
with
80 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters