GNOME Bugzilla – Bug 770174
gupnp_didl_lite_container_get_storage_used fails with minidlna
Last modified: 2019-02-22 05:57:47 UTC
The issue occurs with libgupnp-av-1.0-dev/stable 0.12.6-1 and MiniDLNA version 1.0.26 gupnp_didl_lite_container_get_storage_used fails on parsing Content Directory service info obtained from minidlna Perhaps it is happened cause minidlna returns storageUsed = -1 explicitly. In contrast with minidlna, the twonky server does not return storageUsed at all, and the issued function works properly for twonky. Please see below the responses of both servers. Minidlna response: "<DIDL-Lite xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\" xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\">\n<container id=\"0\" parentID=\"-1\" restricted=\"1\" childCount=\"4\" searchable=\"1\"><upnp:searchClass includeDerived=\"1\">object.item.audioItem</upnp:searchClass><upnp:searchClass includeDerived=\"1\">object.item.imageItem</upnp:searchClass><upnp:searchClass includeDerived=\"1\">object.item.videoItem</upnp:searchClass><dc:title>root</dc:title><upnp:class>object.container.storageFolder</upnp:class><upnp:storageUsed>-1</upnp:storageUsed></container></DIDL-Lite>" Twonky response: "<DIDL-Lite xmlns:dc=\"http://purl.org/dc/elements/1.1/\" xmlns:upnp=\"urn:schemas-upnp-org:metadata-1-0/upnp/\" xmlns:dlna=\"urn:schemas-dlna-org:metadata-1-0/\" xmlns:arib=\"urn:schemas-arib-or-jp:elements-1-0/\" xmlns:dtcp=\"urn:schemas-dtcp-com:metadata-1-0/\" xmlns:pv=\"http://www.pv.com/pvns/\" xmlns=\"urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/\"><container id=\"0\" parentID=\"-1\" restricted=\"1\" childCount=\"3\" searchable=\"1\" pv:persistentID=\"root\"><upnp:searchClass includeDerived=\"1\">object</upnp:searchClass><dc:title>root</dc:title><pv:childCountContainer>3</pv:childCountContainer><pv:modificationTime>1861</pv:modificationTime><upnp:class>object.container</upnp:class></container></DIDL-Lite>"
(In reply to Ivan from comment #0) > gupnp_didl_lite_container_get_storage_used fails on parsing Content > Directory service info obtained from minidlna How does it fail?
Program terminated with signal SIGSEGV, Segmentation fault.
+ Trace 236570
storage = <optimized out> xml_node = 0x99467c8 str = <optimized out> __FUNCTION__ = "gupnp_didl_lite_container_get_storage_used" (gdb) print *xml_node $1 = {_private = 0x0, type = XML_ELEMENT_NODE, name = 0x9946808 "storageUsed", children = 0x9946818, last = 0x9946818, parent = 0x9945f20, next = 0x0, prev = 0x9946710, doc = 0x993f120, ns = 0x99413a0, content = 0x0, properties = 0x0, nsDef = 0x0, psvi = 0x0, line = 0, extra = 0}
Created attachment 368327 [details] [review] Fix parsing of storageUsed For some reason, it was implemented as multi-valued property
Attachment 368327 [details] pushed as 4a89f75 - Fix parsing of storageUsed