X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-proxy-config.cpp;h=804018bc24f983bbeb98a4b619f298d93d9c4194;hb=8b62f21d4317c0d9f48630a9782b1edb944bb11a;hp=0486e73f6182eff46f25fc7a6c90e2fae29099c0;hpb=676640cef321916c94661bd53749130d86555bb9;p=yazproxy-moved-to-github.git diff --git a/src/yaz-proxy-config.cpp b/src/yaz-proxy-config.cpp index 0486e73..804018b 100644 --- a/src/yaz-proxy-config.cpp +++ b/src/yaz-proxy-config.cpp @@ -1,4 +1,4 @@ -/* $Id: yaz-proxy-config.cpp,v 1.8 2004-10-23 23:12:24 adam Exp $ +/* $Id: yaz-proxy-config.cpp,v 1.10 2004-11-30 21:10:45 adam Exp $ Copyright (c) 1998-2004, Index Data. This file is part of the yaz-proxy. @@ -20,12 +20,13 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA */ #include -#include +#include #include #if HAVE_XSLT #include #include +#include #include #include #endif @@ -92,14 +93,18 @@ int Yaz_ProxyConfig::read_xml(const char *fname) if (!ndoc) { - yaz_log(LOG_WARN, "Config file %s not found or parse error", fname); + yaz_log(YLOG_WARN, "Config file %s not found or parse error", fname); return -1; // no good } + int noSubstitutions = xmlXIncludeProcess(ndoc); + if (noSubstitutions == -1) + yaz_log(YLOG_WARN, "XInclude processing failed on config %s", fname); + xmlNodePtr proxyPtr = xmlDocGetRootElement(ndoc); if (!proxyPtr || proxyPtr->type != XML_ELEMENT_NODE || strcmp((const char *) proxyPtr->name, "proxy")) { - yaz_log(LOG_WARN, "No proxy element in %s", fname); + yaz_log(YLOG_WARN, "No proxy element in %s", fname); xmlFreeDoc(ndoc); return -1; }