Initialize Libxml2 - for threaded operation MP-571
authorAdam Dickmeiss <adam@indexdata.dk>
Tue, 9 Sep 2014 09:30:22 +0000 (11:30 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Tue, 9 Sep 2014 09:30:22 +0000 (11:30 +0200)
src/metaproxy_prog.cpp
src/router_flexml.cpp

index 62860ad..5d176ae 100644 (file)
@@ -216,6 +216,9 @@ static int sc_main(
         , test_config ? "test" : "start"
             );
 
+    xmlInitParser();
+    LIBXML_TEST_VERSION
+
     yaz_log_xml_errors(0, YLOG_LOG);
     xmlDocPtr doc = xmlReadFile(fname,
                                 NULL,
index e1f723e..54232de 100644 (file)
@@ -431,8 +431,6 @@ mp::RouterFleXML::RouterFleXML(std::string xmlconf, mp::FactoryFilter &factory,
     bool test_only)
     : m_p(new Rep)
 {
-    LIBXML_TEST_VERSION;
-
     xmlDocPtr doc = xmlParseMemory(xmlconf.c_str(),
                                    xmlconf.size());
     if (!doc)