[rygel] core: Return 718 if destination_uri is missing



commit 495ad8f2d50021bf291e3a22b203fa36f2a9c2c9
Author: Jens Georg <mail jensge org>
Date:   Fri May 27 09:58:38 2011 +0200

    core: Return 718 if destination_uri is missing
    
    Partially fixes UPnP CTT testcase AV-CD:1-9.1

 src/rygel/rygel-content-directory.vala |    1 +
 src/rygel/rygel-import-resource.vala   |   10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/rygel/rygel-content-directory.vala b/src/rygel/rygel-content-directory.vala
index 8b6d01e..f550aa9 100644
--- a/src/rygel/rygel-content-directory.vala
+++ b/src/rygel/rygel-content-directory.vala
@@ -33,6 +33,7 @@ public errordomain Rygel.ContentDirectoryError {
     RESTRICTED_OBJECT = 711,
     BAD_METADATA = 712,
     RESTRICTED_PARENT = 713,
+    NO_SUCH_DESTINATION_RESOURCE = 718,
     CANT_PROCESS = 720,
     INVALID_ARGS = 402
 }
diff --git a/src/rygel/rygel-import-resource.vala b/src/rygel/rygel-import-resource.vala
index 6a40cd2..165044e 100644
--- a/src/rygel/rygel-import-resource.vala
+++ b/src/rygel/rygel-import-resource.vala
@@ -106,10 +106,14 @@ internal class Rygel.ImportResource : GLib.Object, Rygel.StateMachine {
                             out this.destination_uri);
 
         try {
-            if (this.source_uri == null || this.destination_uri == null) {
+            if (this.source_uri == null) {
                 throw new ContentDirectoryError.INVALID_ARGS
-                                        ("Must provide source " +
-                                         "and destination URIs");
+                                        ("Must provide source URI");
+            }
+
+            if (this.destination_uri == null) {
+                throw new ContentDirectoryError.NO_SUCH_DESTINATION_RESOURCE
+                                        ("Must provide destination URI");
             }
 
             // Set action return arguments



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