[PATCH] upnp/satip: Use the satip device type as user_data

Shaleen Jain shaleen at jain.sh
Tue Aug 14 13:57:16 CEST 2018


When calling UpnpSearchAsync pass the satip device type urn
to be explicit about using the same callback as the one
used for the media-server device type.
---
 modules/services_discovery/upnp.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index 2281b3aa1a..c5ca9f2ecb 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -194,7 +194,7 @@ SearchThread( void *p_data )
 
     /* Search for Sat Ip servers*/
     i_res = UpnpSearchAsync( p_sys->p_upnp->handle(), 5,
-            SATIP_SERVER_DEVICE_TYPE, MEDIA_SERVER_DEVICE_TYPE );
+            SATIP_SERVER_DEVICE_TYPE, SATIP_SERVER_DEVICE_TYPE );
     if( i_res != UPNP_E_SUCCESS )
         msg_Err( p_sd, "Error sending search request: %s", UpnpGetErrorMessage( i_res ) );
     return NULL;
@@ -697,7 +697,8 @@ void MediaServerList::removeServer( const std::string& udn )
  */
 int MediaServerList::onEvent( Upnp_EventType event_type, UpnpEventPtr p_event, void* p_user_data )
 {
-    if (p_user_data != MEDIA_SERVER_DEVICE_TYPE)
+    if (p_user_data != MEDIA_SERVER_DEVICE_TYPE &&
+            p_user_data != SATIP_SERVER_DEVICE_TYPE)
         return 0;
 
     switch( event_type )
-- 
2.18.0


More information about the vlc-devel mailing list