upnp: Always specify ContainerID instead of ObjectID
authorHugo Beauzée-Luyssen <hugo@beauzee.fr>
Wed, 25 May 2016 16:58:39 +0000 (18:58 +0200)
committerHugo Beauzée-Luyssen <hugo@beauzee.fr>
Wed, 25 May 2016 17:06:14 +0000 (19:06 +0200)
Additionnaly, ensure we pass "0" instead of an empty string for the root
object

modules/services_discovery/upnp.cpp

index 6429907..570e6c1 100644 (file)
@@ -936,11 +936,11 @@ IXML_Document* MediaServer::_browseAction( const char* psz_object_id_,
         return NULL;
 
     i_res = UpnpAddToAction( &p_action, "Browse",
-            CONTENT_DIRECTORY_SERVICE_TYPE, "ObjectID", psz_object_id_ );
+            CONTENT_DIRECTORY_SERVICE_TYPE, "ContainerID", psz_object_id_ ? psz_object_id_ : "0" );
 
     if ( i_res != UPNP_E_SUCCESS )
     {
-        msg_Dbg( access_, "AddToAction 'ObjectID' failed: %s",
+        msg_Dbg( access_, "AddToAction 'ContainerID' failed: %s",
                 UpnpGetErrorMessage( i_res ) );
         goto browseActionCleanup;
     }