[PATCH 2/4] upnp: do not pass the upnp instance as user data

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


UPNP SDK functions cannot be called from the registered
callback so there is no point in passing an instance of
upnp instance to the callback as a user data.
---
 modules/services_discovery/upnp-wrapper.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/services_discovery/upnp-wrapper.cpp b/modules/services_discovery/upnp-wrapper.cpp
index 6ff748c8b4..3e924274dc 100644
--- a/modules/services_discovery/upnp-wrapper.cpp
+++ b/modules/services_discovery/upnp-wrapper.cpp
@@ -85,7 +85,7 @@ UpnpInstanceWrapper *UpnpInstanceWrapper::get(vlc_object_t *p_obj)
         ixmlRelaxParser( 1 );
 
         /* Register a control point */
-        i_res = UpnpRegisterClient( Callback, instance, &instance->m_handle );
+        i_res = UpnpRegisterClient( Callback, NULL, &instance->m_handle );
         if( i_res != UPNP_E_SUCCESS )
         {
             msg_Err( p_obj, "Client registration failed: %s", UpnpGetErrorMessage( i_res ) );
-- 
2.18.0


More information about the vlc-devel mailing list