Opened 12 years ago

Closed 12 years ago

#4355 closed defect (fixed)

UPnP share path missing in GetServDesc

Reported by: otto at kolsi dot fi Owned by: dblain
Priority: minor Milestone: unknown
Component: upnp Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Fix in [15220] tries to fix the path for UPnP files but GetServDesc? method still fails to locate CMGR_scpd.xml file.

Now the SharePath? is okay:

2007-12-23 15:23:30.974 HttpServer( 6544 ) - SharePath = /usr/local/share/mythtv/

But when GetServDesc? is received, the file is still opened without full path and it fails. I've modified this one log print to show what file/path is used:

2007-12-23 15:23:41.809 UPnpCMGR::ProcessRequest - Method (GetServDesc), file: CMGR_scpd.xml
2007-12-23 15:23:47.704 UPnpCMGR::ProcessRequest - Method (GetServDesc), file: CMGR_scpd.xml
2007-12-23 15:23:49.114 UPnpCMGR::ProcessRequest - Method (GetServDesc), file: CMGR_scpd.xml

Problem can be solved by adding "UPnP/DescXmlPath" setting wo DB but I think this is supposed to work without that setting.

Change History (4)

comment:1 Changed 12 years ago by Nigel

It looks like something hinky with GetValue?, but I cannot fathom what. This extra debug:

Index: libs/libmythupnp/upnpcmgr.cpp
===================================================================
--- libs/libmythupnp/upnpcmgr.cpp       (revision 15051)
+++ libs/libmythupnp/upnpcmgr.cpp       (working copy)
@@ -29,9 +30,12 @@
     SetValue< QString >( "SinkProtocolInfo"    , sSinkProtocols   );
 
     QString sUPnpDescPath = UPnp::g_pConfig->GetValue( "UPnP/DescXmlPath", m_sSharePath );
+printf("UPnpCMGR:: - sharePath='%s', descpath='%s'\n",
+       m_sSharePath.ascii(), sUPnpDescPath.ascii());
 
     m_sServiceDescFileName = sUPnpDescPath + "CMGR_scpd.xml";
     m_sControlUrl          = "/CMGR_Control";
+printf("UPnpCMGR:: - descFileName = '%s'\n", m_sServiceDescFileName.ascii());
 
     // Add our Service Definition to the device.
 

produces:

2007-12-24 08:43:37.328 MediaServer::Registering CMGR Service.
UPnpCMGR:: - sharePath='/usr/share/mythtv/', descpath='(null)'
UPnpCMGR:: - descFileName = 'CMGR_scpd.xml'

comment:2 Changed 12 years ago by Nigel

(In [15224]) Prevent GetSetting?() from storing a QString::null in the settings cache. UPnP currently does this with UPnP/DescXmlPath. See #4355. The correct fix is for the caller to not send null as a defaultval, but checking for this will add a little robustness.

comment:3 Changed 12 years ago by Nigel

(In [15231]) UPnpCMGR::ProcessRequest?(CMGRM_GetServiceDescription) uses the filename which is set at object creation time, so this passes the share path in to the xtor. Should fix the current UPnP issue. See #4355. See #4317. See #2467.

Note 1) the frontend MediaRenderer? shouldn't need to share anything(?),

so its xtor gets an empty string.

Note 2) I suspect [15220] can be reverted,

but I will wait for David Blain to verify that

comment:4 Changed 12 years ago by Nigel

Resolution: fixed
Status: newclosed

Assuming fixed in [15231]

Note: See TracTickets for help on using tickets.