GNOME Bugzilla – Bug 740365
namespace getters in GUPnPDIDLLiteObject are broken
Last modified: 2019-02-22 05:57:50 UTC
GUPnPDIDLLiteObject has getters for the XML namespaces: gupnp_didl_lite_object_get_upnp_namespace() gupnp_didl_lite_object_get_dc_namespace() gupnp_didl_lite_object_get_dlna_namespace() gupnp_didl_lite_object_get_pv_namespace() These are intented for third-party code that needs access to these namespaces in order to enrich the DIDL-Lite XML fragment. With the changes that went into 0.12.6 the namespace handling was changed considerably so that namespaces are now created lazily. This creates two problems: (1) The namespace getters will return NULL if they are used before another internal function has created the namespace. (2) The optimization that namespaces are not created for each object but shared across all objects created by the same GUPnPDIDLLiteWriter is gone. I am attaching two patches. One adds a unit test for the namespace getters. The second patch fixes problem (1). Problem (2) remains open for now, but it's just a missing optimization and does not really count as a bug. So it has lower priority and can be addressed later.
Created attachment 290998 [details] [review] add units test for GUPnPDIDLLiteObject namespace
Created attachment 290999 [details] [review] gupnp-didl-lite-object: fix namespace getters
Review of attachment 290999 [details] [review]: +1
Review of attachment 290998 [details] [review]: +1