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



commit 80e8db5aa0b32e2b3066210c9953a99e404f25a1
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Fri Sep 24 20:36:57 2010 +0200

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

 .../Banshee.ServiceStack/ServiceManager.cs         |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs b/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
index ed06669..374897c 100644
--- a/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
+++ b/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
@@ -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> ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]