Integrate parser pools into library.
[shibboleth/cpp-xmltooling.git] / xmltooling / util / ParserPool.cpp
index 838c044..4897338 100644 (file)
@@ -161,7 +161,7 @@ bool ParserPool::loadCatalog(const XMLCh* pathname)
     LocalFileInputSource fsrc(NULL,pathname);
     Wrapper4InputSource domsrc(&fsrc,false);
     try {
-        DOMDocument* doc=XMLToolingInternalConfig::getInternalConfig().m_parserPool->parse(domsrc);
+        DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(domsrc);
         
         // Check root element.
         const DOMElement* root=doc->getDocumentElement();
@@ -233,7 +233,8 @@ DOMInputSource* ParserPool::resolveEntity(const XMLCh* const publicId, const XML
 #endif    
 
     // Shortcircuit the request.
-    log.warn("unauthorized entity request, blocking it");
+    auto_ptr_char sysId(systemId);
+    log.warn("unauthorized entity request (%s), blocking it", sysId.get() ? sysId.get() : "no systemId");
     static const XMLByte nullbuf[] = {0};
     return new Wrapper4InputSource(new MemBufInputSource(nullbuf,0,systemId));
 }