core: List/report all transfers
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Tue, 24 Aug 2010 14:32:06 +0000 (17:32 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Tue, 24 Aug 2010 14:53:36 +0000 (17:53 +0300)
'TransferIDs' state variable should list IDs for all transfers we have,
even the ones that are complete.

src/rygel/rygel-content-directory.vala

index 06acf04..e812e7c 100644 (file)
@@ -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;
         });
     }