Menu

#2 rootNode of Device is null for non-root devices

open
None
5
2003-12-19
2003-12-17
No

On initialization of a device in
CyberLink::Device::initDeviceList(), the root node is not
propagated to child devices. This leads to null pointer
exceptions when relying on
CyberLink::Device::getRootDevice() to return a valid
pointer (see f.i.
CyberLink::ControlRequest::setRequestHost() line 46).

The bug can be fixed by changing line 176 in
cybergarage/upnp/Device.cpp from:

Device *dev = new Device(node);

to:

Device *dev = new Device(rootNode, node);

Discussion

  • Suzan Foster

    Suzan Foster - 2003-12-17

    Fixed source file

     
  • Satoshi Konno

    Satoshi Konno - 2003-12-19
    • assigned_to: nobody --> skonno
     
  • Satoshi Konno

    Satoshi Konno - 2003-12-20

    Logged In: YES
    user_id=559351

    The root node is a root node of description XML structure.
    The root node is already null. but root node is set when a
    control point returns the discoverd device list.

    Do you have any problems ?

     
MongoDB Logo MongoDB