X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-proxy-config.cpp;h=88449f35a9dc02a1ea1710179a98971f2e2661d6;hb=d3d51bee2100324025f7530d4e3ff3502397fd83;hp=ef7b279980d184774940bd3b16cb8044b9df784f;hpb=64584e7fd77bb392f444986f0d0472cc66fd658b;p=yazpp-moved-to-github.git diff --git a/src/yaz-proxy-config.cpp b/src/yaz-proxy-config.cpp index ef7b279..88449f3 100644 --- a/src/yaz-proxy-config.cpp +++ b/src/yaz-proxy-config.cpp @@ -2,7 +2,7 @@ * Copyright (c) 1998-2004, Index Data. * See the file LICENSE for details. * - * $Id: yaz-proxy-config.cpp,v 1.24 2004-01-15 23:44:58 adam Exp $ + * $Id: yaz-proxy-config.cpp,v 1.27 2004-01-30 00:38:28 adam Exp $ */ #include @@ -458,7 +458,8 @@ int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name, } if (match) { - syntax_has_matched = 1; + if (!match_error) + syntax_has_matched = 1; match = check_schema(ptr->children, comp, match_identifier); } if (match) @@ -479,7 +480,7 @@ int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name, } if (match_error) { - if (syntax_has_matched) // if syntax did match, schema/ESN was bad + if (syntax_has_matched) // if syntax OK, bad schema/ESN return 25; if (syntax) { @@ -702,7 +703,7 @@ char *Yaz_ProxyConfig::get_explain(ODR odr, const char *name, const char *db, break; if (!ptr1) continue; - for (ptr1 = ptr1->children; ptr; ptr1 = ptr1->next) + for (ptr1 = ptr1->children; ptr1; ptr1 = ptr1->next) if (ptr1->type == XML_ELEMENT_NODE && !strcmp((const char *) ptr1->name, "database")) break; @@ -734,7 +735,6 @@ char *Yaz_ProxyConfig::get_explain(ODR odr, const char *name, const char *db, } } #endif - yaz_log(LOG_WARN, "No explain node"); return 0; }