[vlc-commits] upnp: Call ixmlRelaxParser only once

Mirsal Ennaime git at videolan.org
Tue May 1 09:40:19 CEST 2012


vlc | branch: master | Mirsal Ennaime <mirsal at videolan.org> | Tue May  1 04:58:11 2012 +0200| [1408e44ad043bee7da699a5d3351b87bb1f630b6] | committer: Mirsal Ennaime

upnp: Call ixmlRelaxParser only once

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

 modules/services_discovery/upnp.cpp |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
index ce234ec..e69c13e 100644
--- a/modules/services_discovery/upnp.cpp
+++ b/modules/services_discovery/upnp.cpp
@@ -121,6 +121,8 @@ static int Open( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
+    ixmlRelaxParser( 1 );
+
     p_sys->p_server_list = new MediaServerList( p_sd );
     vlc_mutex_init( &p_sys->callback_lock );
 
@@ -249,8 +251,6 @@ const char* xml_getChildElementValue( IXML_Document*  p_doc,
  */
 IXML_Document* parseBrowseResult( IXML_Document* p_doc )
 {
-    ixmlRelaxParser( 1 );
-
     const char* psz_result_string = xml_getChildElementValue( p_doc, "Result" );
     if( !psz_result_string ) return 0;
 
@@ -265,8 +265,6 @@ IXML_Document* parseBrowseResult( IXML_Document* p_doc )
 int xml_getNumber( IXML_Document* p_doc,
                    const char* psz_tag_name )
 {
-    ixmlRelaxParser( 1 );
-
     const char* psz = xml_getChildElementValue( p_doc, psz_tag_name );
     if( !psz ) return 0;
 



More information about the vlc-commits mailing list