Commit 80e8db5a authored by Bertrand Lorentz's avatar Bertrand Lorentz

[ServiceManager] Register the Network service early (bgo#627441)

This is a workaround to avoid two race conditions in ndesk-dbus :
* Initializing the Network service early means that Bus.System will be
instantiated before any other threads doing dbus stuff are started,
avoiding the first race.
* Doing it in the main thread means the code exhibiting the second race
will not be used.

See the bug for details and links to the proper fixes for those races in
dbus-sharp :
https://bugzilla.gnome.org/show_bug.cgi?id=627441

Thanks to Jérémie Laval and Alan McGovern for tracking down those race
conditions.
parent c363f88a
......@@ -100,6 +100,9 @@ namespace Banshee.ServiceStack
RegisterService<DBusCommandService> ();
RegisterService<BansheeDbConnection> ();
RegisterService<Banshee.Preferences.PreferenceService> ();
// HACK: the next line shouldn't be here, it's needed to work around
// a race in NDesk DBus. See bgo#627441.
RegisterService<Banshee.Networking.Network> ();
RegisterService<SourceManager> ();
RegisterService<MediaProfileManager> ();
RegisterService<PlayerEngineService> ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment