From 9bb293ca617b8434f8803f4aded4344008a846c5 Mon Sep 17 00:00:00 2001 From: "Zeeshan Ali (Khattak)" Date: Tue, 24 Aug 2010 17:32:06 +0300 Subject: [PATCH] core: List/report all transfers 'TransferIDs' state variable should list IDs for all transfers we have, even the ones that are complete. --- src/rygel/rygel-content-directory.vala | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/src/rygel/rygel-content-directory.vala b/src/rygel/rygel-content-directory.vala index 06acf04..e812e7c 100644 --- a/src/rygel/rygel-content-directory.vala +++ b/src/rygel/rygel-content-directory.vala @@ -353,13 +353,11 @@ internal class Rygel.ContentDirectory: Service { var ids = ""; foreach (var import in this.active_imports) { - if (import.status != TransferStatus.COMPLETED) { - if (ids != "") { - ids += ","; - } - - ids += import.transfer_id.to_string (); + if (ids != "") { + ids += ","; } + + ids += import.transfer_id.to_string (); } return ids; @@ -368,15 +366,15 @@ internal class Rygel.ContentDirectory: Service { private void on_import_completed (StateMachine machine) { var import = machine as ImportResource; - this.notify ("TransferIDs", - typeof (string), - this.create_transfer_ids ()); - // According to CDS specs (v3 section 2.4.17), we must not immediately // remove the import from out memory Timeout.add_seconds (30, () => { this.active_imports.remove (import); + this.notify ("TransferIDs", + typeof (string), + this.create_transfer_ids ()); + return false; }); } -- 2.7.4