[rygel] core: Correct status if ImportResource was stopped



commit f404beddb67ada4e2a6e7c44752cf7cdc9c28660
Author: Jens Georg <mail jensge org>
Date:   Wed Jun 1 16:07:51 2011 +0200

    core: Correct status if ImportResource was stopped
    
    Partially fixes UPnP CTT AV-CD:1-11.1

 src/rygel/rygel-import-resource.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-import-resource.vala b/src/rygel/rygel-import-resource.vala
index 6ed5fea..6a40cd2 100644
--- a/src/rygel/rygel-import-resource.vala
+++ b/src/rygel/rygel-import-resource.vala
@@ -222,7 +222,11 @@ internal class Rygel.ImportResource : GLib.Object, Rygel.StateMachine {
                                           this.cancellable);
         } catch (Error error) {
             warning ("%s", error.message);
-            this.status = TransferStatus.ERROR;
+            if (error is IOError.CANCELLED) {
+                this.status = TransferStatus.STOPPED;
+            } else {
+                this.status = TransferStatus.ERROR;
+            }
             this.session.cancel_message (message,
                                          KnownStatusCode.CANCELLED);
         }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]