[rygel] server: Avoid circular reference
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] server: Avoid circular reference
- Date: Sat, 31 Jan 2015 08:19:21 +0000 (UTC)
commit 4e584c97fbcff6018a8264c49171698c76278d01
Author: Jens Georg <mail jensge org>
Date: Sat Jan 31 01:56:12 2015 +0100
server: Avoid circular reference
Signed-off-by: Jens Georg <mail jensge org>
https://bugzilla.gnome.org/show_bug.cgi?id=736365
src/librygel-server/rygel-content-directory.vala | 5 ++---
src/librygel-server/rygel-media-container.vala | 4 ++++
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/librygel-server/rygel-content-directory.vala
b/src/librygel-server/rygel-content-directory.vala
index e87f480..20bf25a 100644
--- a/src/librygel-server/rygel-content-directory.vala
+++ b/src/librygel-server/rygel-content-directory.vala
@@ -95,9 +95,8 @@ public class Rygel.ContentDirectory: Service {
this.root_container = plugin.root_container;
this.http_server = new HTTPServer (this, plugin.name);
- this.updated_containers = new ArrayList<MediaContainer> ((a, b) => {
- return a.id == b.id;
- });
+ this.updated_containers = new ArrayList<MediaContainer>
+ (MediaContainer.equal_func);
this.active_imports = new ArrayList<ImportResource> ();
this.finished_imports = new ArrayList<ImportResource> ();
diff --git a/src/librygel-server/rygel-media-container.vala b/src/librygel-server/rygel-media-container.vala
index a5a6514..a0b6f49 100644
--- a/src/librygel-server/rygel-media-container.vala
+++ b/src/librygel-server/rygel-media-container.vala
@@ -75,6 +75,10 @@ public abstract class Rygel.MediaContainer : MediaObject {
"+upnp:originalTrackNumber," +
"+dc:title";
+ public static bool equal_func (MediaContainer a, MediaContainer b) {
+ return a.id == b.id;
+ }
+
/**
* The container_updated signal is emitted if the subtree unter this
* container has been modified. The object parameter is set to
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]