[banshee] [Services] Fix side-effects of recent refactoring (bgo#626022)
- From: Andrés Aragoneses <aaragoneses src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [Services] Fix side-effects of recent refactoring (bgo#626022)
- Date: Tue, 10 Aug 2010 17:19:10 +0000 (UTC)
commit 703777a0d72f1ef08218eb9883efbb3147844dc6
Author: Andrés G. Aragoneses <knocte gmail com>
Date: Tue Aug 10 19:07:17 2010 +0200
[Services] Fix side-effects of recent refactoring (bgo#626022)
My commit didn't take in account how the DelayedInitialize() functions
worked so this was causing some service to be initialized twice. Also
some API bits got broken but they were not being used anyway.
Signed-off-by: Gabriel Burt <gabriel burt gmail com>
.../Banshee.ServiceStack/ServiceManager.cs | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs b/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
index dea66ab..e7f3657 100644
--- a/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
+++ b/src/Core/Banshee.Services/Banshee.ServiceStack/ServiceManager.cs
@@ -253,8 +253,12 @@ namespace Banshee.ServiceStack
lock (self_mutex) {
if (!delayed_initialized) {
have_client = true;
+ var initialized = new HashSet <string> ();
foreach (IService service in services.Values) {
- DelayedInitialize (service);
+ if (!initialized.Contains (service.ServiceName)) {
+ DelayedInitialize (service);
+ initialized.Add (service.ServiceName);
+ }
}
delayed_initialized = true;
}
@@ -391,10 +395,6 @@ namespace Banshee.ServiceStack
get { return service_types.Count + (extension_nodes == null ? 0 : extension_nodes.Count) + 1; }
}
- public static int ServiceCount {
- get { return services.Count; }
- }
-
public static bool IsInitialized {
get { return is_initialized; }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]