vlc | branch: master | Steve Lhomme <[email protected]> | Wed Jun 1 16:38:07 2016 +0200| [f62dfb1bd442a10784519b023e58406dbcdd34ec] | committer: Jean-Baptiste Kempf
upnp: MediaServerList::m_lock protects the access to m_list parseNewServer() is called from various threads of UPNP so we need to protect our server list Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f62dfb1bd442a10784519b023e58406dbcdd34ec --- modules/services_discovery/upnp.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp index e967e2e..7e88c12 100644 --- a/modules/services_discovery/upnp.cpp +++ b/modules/services_discovery/upnp.cpp @@ -398,6 +398,8 @@ void MediaServerList::parseNewServer( IXML_Document *doc, const std::string &loc if ( !p_device_list ) return; + + vlc_mutex_locker lock( &m_lock ); for ( unsigned int i = 0; i < ixmlNodeList_length( p_device_list ); i++ ) { IXML_Element* p_device_element = ( IXML_Element* ) ixmlNodeList_item( p_device_list, i ); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
