Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
device.xml is written with incorrect domain name
30-08-2011, 09:05 PM
Post: #1
device.xml is written with incorrect domain name
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);
Find all posts by this user
31-08-2011, 01:35 PM
Post: #2
RE: device.xml is written with incorrect domain name
(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?
Find all posts by this user
31-08-2011, 02:20 PM
Post: #3
RE: device.xml is written with incorrect domain name
(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.
Find all posts by this user


Forum Jump: