/*
\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).
*/
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") );
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 ) );
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 );