OpenHome Forum
device.xml is written with incorrect domain name - Printable Version

+- OpenHome Forum (http://forum.openhome.org)
+-- Forum: OpenHome (/forumdisplay.php?fid=1)
+--- Forum: Net (/forumdisplay.php?fid=5)
+--- Thread: device.xml is written with incorrect domain name (/showthread.php?tid=490)



device.xml is written with incorrect domain name - simoncn - 30-08-2011 09:05 PM

When the device stack writes the device.xml file, it puts the wrong domain name into the <deviceType> field. This field should start with urn:schemas-upnp-org:device: but instead it is written as urn:upnp.org:device: and this causes some control points to fail to discover the device.

The problem is caused by some incorrect code in the DviProtocolUpnpDeviceXmlWriter::Write method in DviProtocolUpnp.cpp. The following lines:
Code:
Brn upnpDomain = iDeviceUpnp.Domain();
Bwh canonicalDomain(upnpDomain.Bytes() + 10);
Ssdp::UpnpDomainToCanonical(upnpDomain, canonicalDomain);
iWriter.Write(canonicalDomain);
should be replaced with:
Code:
Brn canonicalDomain = iDeviceUpnp.Domain();
Bwh upnpDomain(canonicalDomain.Bytes() + 10);
Ssdp::CanonicalDomainToUpnp(canonicalDomain, upnpDomain);
iWriter.Write(upnpDomain);



RE: device.xml is written with incorrect domain name - simonc - 31-08-2011 01:35 PM

(30-08-2011 09:05 PM)simoncn Wrote:  When the device stack writes the device.xml file, it puts the wrong domain name into the <deviceType> field. This field should start with urn:schemas-upnp-org:device: but instead it is written as urn:upnp.org:device: and this causes some control points to fail to discover the device.

The problem is caused by some incorrect code in the DviProtocolUpnpDeviceXmlWriter::Write method in DviProtocolUpnp.cpp.

Good spot. I've fixed this internally so the update will be on github shortly.

Out of interest, what Control Point(s) were affected by this error?


RE: device.xml is written with incorrect domain name - simoncn - 31-08-2011 02:20 PM

(31-08-2011 01:35 PM)simonc Wrote:  Out of interest, what Control Point(s) were affected by this error?

I had a problem with PlugPlayer, but not with KinskyDesktop or ChorusDS. I found this a bit puzzling and I was looking at device.xml for possible clues when I happened to spot the problem.