rygel r407 - in trunk: data/xml src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r407 - in trunk: data/xml src/rygel
- Date: Tue, 30 Dec 2008 16:04:37 +0000 (UTC)
Author: zeeshanak
Date: Tue Dec 30 16:04:37 2008
New Revision: 407
URL: http://svn.gnome.org/viewvc/rygel?rev=407&view=rev
Log:
Don't put iconList in description if there isn't any icon.
Providing an empty iconList was causing problems with gupnp-*-cp and PS3.
PS3 was just ignoring the whole Media Server instance and gupnp-*-cp were
segfaulting (that bug has long been fixed in gupnp though).
Modified:
trunk/data/xml/description.xml
trunk/src/rygel/rygel-media-server-factory.vala
Modified: trunk/data/xml/description.xml
==============================================================================
--- trunk/data/xml/description.xml (original)
+++ trunk/data/xml/description.xml Tue Dec 30 16:04:37 2008
@@ -15,8 +15,6 @@
<serialNumber>0000001</serialNumber>
<UPC></UPC>
<presentationURL></presentationURL>
-<iconList>
-</iconList>
<serviceList>
</serviceList>
<dlna:X_DLNADOC>DMS-1.50</dlna:X_DLNADOC>
Modified: trunk/src/rygel/rygel-media-server-factory.vala
==============================================================================
--- trunk/src/rygel/rygel-media-server-factory.vala (original)
+++ trunk/src/rygel/rygel-media-server-factory.vala Tue Dec 30 16:04:37 2008
@@ -291,15 +291,15 @@
private void add_icons_to_desc (Xml.Node *device_element,
Plugin plugin) {
- Xml.Node *icon_list_node = Utils.get_xml_element (device_element,
- "iconList",
- null);
- if (icon_list_node == null) {
- warning ("Element /root/device/iconList not found.");
+ if (plugin.icon_infos == null || plugin.icon_infos.size == 0) {
+ debug ("No icon provided by %s.", plugin.name);
return;
}
+ Xml.Node *icon_list_node = device_element->new_child (null,
+ "iconList",
+ null);
foreach (IconInfo icon_info in plugin.icon_infos) {
add_icon_to_desc (icon_list_node, icon_info, plugin);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]