[rygel] core: Make sure parent container is alive
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Make sure parent container is alive
- Date: Thu, 30 Aug 2012 15:00:21 +0000 (UTC)
commit 9fc42fd00a5aac3b223febf5375856f841d1ad88
Author: Jens Georg <mail jensge org>
Date: Thu Aug 30 16:54:41 2012 +0200
core: Make sure parent container is alive
If the item does not carry a reference to its parent, we set it to make
sure the container is still alive if we run in the auto-removal
timeout.
src/librygel-server/rygel-item-removal-queue.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-server/rygel-item-removal-queue.vala b/src/librygel-server/rygel-item-removal-queue.vala
index 540fa00..282b1a1 100644
--- a/src/librygel-server/rygel-item-removal-queue.vala
+++ b/src/librygel-server/rygel-item-removal-queue.vala
@@ -41,6 +41,10 @@ internal class Rygel.ItemRemovalQueue: GLib.Object {
}
public void queue (MediaItem item, Cancellable? cancellable) {
+ if (item.parent_ref == null) {
+ item.parent_ref = item.parent;
+ }
+
var timeout = Timeout.add_seconds (TIMEOUT, () => {
debug ("Timeout on temporary item '%s'.", item.id);
this.remove_now.begin (item, cancellable);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]