[vlc-devel] commit: UPnP services discovery: fix remaining bugs (Mirsal Ennaime )

git version control git at videolan.org
Sun Jan 4 11:32:59 CET 2009


vlc | branch: master | Mirsal Ennaime <mirsal at mirsal-laptop.(none)> | Fri Dec 26 00:52:45 2008 +0100| [5858f0fccb1f97087d630712c9526d553599adb7] | committer: Mirsal Ennaime 

UPnP services discovery: fix remaining bugs

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5858f0fccb1f97087d630712c9526d553599adb7
---

 modules/services_discovery/upnp_intel.cpp |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/modules/services_discovery/upnp_intel.cpp b/modules/services_discovery/upnp_intel.cpp
index e6b65bb..1e1b4f8 100644
--- a/modules/services_discovery/upnp_intel.cpp
+++ b/modules/services_discovery/upnp_intel.cpp
@@ -28,7 +28,6 @@
 /*
   \TODO: Debug messages: "__FILE__, __LINE__" ok ???, Wrn/Err ???
   \TODO: Change names to VLC standard ???
-  \TODO: Rewrite this using the new service discovery API (see sap.c, shout.c).
 */
 
 
@@ -288,7 +287,8 @@ static int Open( vlc_object_t *p_this )
     services_discovery_sys_t *p_sys  = ( services_discovery_sys_t * )
             calloc( 1, sizeof( services_discovery_sys_t ) );
 
-    p_sd->p_sys = p_sys;
+    if(!(p_sd->p_sys = p_sys))
+        return VLC_ENOMEM;
 
     services_discovery_SetLocalizedName( p_sd, _("UPnP devices") );
 
@@ -302,7 +302,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->serverList = new MediaServerList( p_sd );
     p_sys->callbackLock = new Lockable();
 
-    res = UpnpRegisterClient( Callback, p_sys, &p_sys->clientHandle );
+    res = UpnpRegisterClient( Callback, p_sd, &p_sys->clientHandle );
     if( res != UPNP_E_SUCCESS )
     {
         msg_Err( p_sd, "%s", UpnpGetErrorMessage( res ) );
@@ -1068,7 +1068,6 @@ bool MediaServerList::addServer( MediaServer* s )
             s->getFriendlyName() );
 
     services_discovery_t* p_sd = _p_sd;
-    
 
     p_input_item = input_item_New( p_sd, "vlc://nop", s->getFriendlyName() ); 
     s->setInputItem( p_input_item );




More information about the vlc-devel mailing list