[rygel] core: Return proper error if dc:title is missing



commit 30b43289c1ab7ffd638e0d4e6d427e32aeb95efa
Author: Jens Georg <mail jensge org>
Date:   Mon May 2 12:05:51 2011 +0200

    core: Return proper error if dc:title is missing
    
    dc:title is mandatory as per ContentDirectoryV2 specification, 2.5.8

 src/rygel/rygel-item-creator.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-item-creator.vala b/src/rygel/rygel-item-creator.vala
index 5be7a91..8603f56 100644
--- a/src/rygel/rygel-item-creator.vala
+++ b/src/rygel/rygel-item-creator.vala
@@ -70,6 +70,12 @@ internal class Rygel.ItemCreator: GLib.Object, Rygel.StateMachine {
                 throw new ItemCreatorError.PARSE (message, this.elements);
             }
 
+            if ((didl_item.title == null)) {
+                throw new ContentDirectoryError.BAD_METADATA
+                                        ("dc:title must be set in " +
+                                         "CreateItem");
+            }
+
             if ((didl_item.dlna_managed &
                 (OCMFlags.UPLOAD |
                  OCMFlags.CREATE_CONTAINER |



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