After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 703044 - DescriptionFile.set_device_element() should create elements if they do not exists
DescriptionFile.set_device_element() should create elements if they do not ex...
Status: RESOLVED FIXED
Product: rygel
Classification: Applications
Component: librygel-core
git master
Other Linux
: Normal normal
: ---
Assigned To: rygel-maint
rygel-maint
Depends on:
Blocks:
 
 
Reported: 2013-06-25 10:51 UTC by Jussi Kukkonen
Modified: 2013-06-27 12:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
DescriptionFile: create device elements if they do not exists (3.06 KB, patch)
2013-06-25 11:49 UTC, Jussi Kukkonen
none Details | Review
DescriptionFile: create device elements if they do not exists (3.53 KB, patch)
2013-06-25 11:52 UTC, Jussi Kukkonen
none Details | Review

Description Jussi Kukkonen 2013-06-25 10:51:53 UTC
Setting the contents of non-required elements dynamically in the description doc  does not work (unless an empty element is added into the template xml first). 

It makes more sense to create the whole element dynamically in this case: this way the default xml size does not grow.

I'll attach a patch.
Comment 1 Jens Georg 2013-06-25 11:05:59 UTC
True.
Comment 2 Jussi Kukkonen 2013-06-25 11:49:24 UTC
Created attachment 247721 [details] [review]
DescriptionFile: create device elements if they do not exists

set_device_element() may be called with names of elements that do not
exists yet (non-required elements that are empty by default).

Create elements dynamically in set_device_element(). also, remove
the X_DLNACAP element if the contents are empty.
Comment 3 Jussi Kukkonen 2013-06-25 11:52:58 UTC
Created attachment 247722 [details] [review]
DescriptionFile: create device elements if they do not exists

set_device_element() may be called with names of elements that do not
exists yet (non-required elements that are empty by default).

Create elements dynamically in set_device_element(). also, remove
the X_DLNACAP element if the contents are empty.
Comment 4 Jens Georg 2013-06-25 12:01:17 UTC
Agree on the patch, might interfere with https://bugzilla.gnome.org/show_bug.cgi?id=702451 though. (That's a warning, not a fail)
Comment 5 Jussi Kukkonen 2013-06-27 09:57:10 UTC
Comment on attachment 247722 [details] [review]
DescriptionFile: create device elements if they do not exists

Marking obsolete as the patch set in bug 702451 covers this (and also sets the "dlna" namespace correctly).