Commit 76b349a3 authored by Konstantin Pavlov's avatar Konstantin Pavlov

UPNP: When removing server, also remove it from SD listings

parent 506a4fc4
......@@ -856,6 +856,11 @@ void MediaServer::setInputItem( input_item_t* p_input_item )
_p_input_item = p_input_item;
}
input_item_t* MediaServer::getInputItem() const
{
return _p_input_item;
}
bool MediaServer::compareSID( const char* psz_sid )
{
return ( strncmp( _subscription_id, psz_sid, sizeof( Upnp_SID ) ) == 0 );
......@@ -934,6 +939,8 @@ void MediaServerList::removeServer( const char* psz_udn )
msg_Dbg( _p_sd, "Removing server '%s'", p_server->getFriendlyName() );
services_discovery_RemoveItem( _p_sd, p_server->getInputItem() );
std::vector<MediaServer*>::iterator it;
for ( it = _list.begin(); it != _list.end(); ++it )
{
......
......@@ -63,6 +63,7 @@ public:
void fetchContents();
void setInputItem( input_item_t* p_input_item );
input_item_t* getInputItem() const;
bool compareSID( const char* psz_sid );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment