[rygel/rygel-0-24] core: Fix use of OCM flag
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel/rygel-0-24] core: Fix use of OCM flag
- Date: Sat, 24 Jan 2015 16:26:21 +0000 (UTC)
commit 4656419a949d6baaada6bf67626f89827909fe80
Author: Jens Georg <mail jensge org>
Date: Tue Nov 18 17:10:45 2014 +0100
core: Fix use of OCM flag
Signed-off-by: Jens Georg <mail jensge org>
src/librygel-core/rygel-description-file.vala | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/librygel-core/rygel-description-file.vala b/src/librygel-core/rygel-description-file.vala
index 4c1e82d..1d4ef07 100644
--- a/src/librygel-core/rygel-description-file.vala
+++ b/src/librygel-core/rygel-description-file.vala
@@ -200,23 +200,28 @@ public class Rygel.DescriptionFile : Object {
} catch (GLib.Error error) { }
if (allow_upload) {
+ bool can_upload = false;
if (PluginCapabilities.IMAGE_UPLOAD in capabilities) {
flags += "image-upload";
+ can_upload = true;
}
if (PluginCapabilities.VIDEO_UPLOAD in capabilities) {
flags += "av-upload";
+ can_upload = true;
}
if (PluginCapabilities.AUDIO_UPLOAD in capabilities) {
flags += "audio-upload";
+ can_upload = true;
}
- }
- if (allow_delete) {
- flags += "create-item-with-OCM-destroy-item";
+ // destroy capablity needs to co-exist with at least one
+ // of the upload caps. DLNA 2014, 7.4.1.8.4.1, Table 26
+ if (allow_delete && can_upload) {
+ flags += "create-item-with-OCM-destroy-item";
+ }
}
-
}
if (PluginCapabilities.TRACK_CHANGES in capabilities) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]