X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fyaz-proxy-config.cpp;h=7a3134b3a2254a2ff6345e437128863f81226e4f;hb=eca406342a6af973b7b8687e739b3ebc2d8a18c5;hp=c849575298b46f5f670a54cc208527c0dd9198ff;hpb=9d577e365bb10ae1bc0b3e4ee76bc0f888896d4f;p=yazpp-moved-to-github.git diff --git a/src/yaz-proxy-config.cpp b/src/yaz-proxy-config.cpp index c849575..7a3134b 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.21 2004-01-07 11:17:05 adam Exp $ + * $Id: yaz-proxy-config.cpp,v 1.23 2004-01-07 13:40:06 adam Exp $ */ #include @@ -346,12 +346,10 @@ int Yaz_ProxyConfig::check_query(ODR odr, const char *name, Z_Query *query, #if HAVE_XSLT int Yaz_ProxyConfig::check_schema(xmlNodePtr ptr, Z_RecordComposition *comp, - const char **found_schema, const char *schema_identifier) { char *esn = 0; int default_match = 1; - *found_schema = schema_identifier; // may be NULL if (comp && comp->which == Z_RecordComp_simple && comp->u.simple && comp->u.simple->which == Z_ElementSetNames_generic) { @@ -363,7 +361,6 @@ int Yaz_ProxyConfig::check_schema(xmlNodePtr ptr, Z_RecordComposition *comp, // check if schema identifier match if (schema_identifier && !strcmp(esn, schema_identifier)) return 1; - *found_schema = esn; // Check each name element for (; ptr; ptr = ptr->next) { @@ -459,12 +456,10 @@ int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name, match = 1; } } - const char *match_schema = 0; if (match) { syntax_has_matched = 1; - match = check_schema(ptr->children, comp, &match_schema, - match_identifier); + match = check_schema(ptr->children, comp, match_identifier); } if (match) { @@ -473,10 +468,10 @@ int Yaz_ProxyConfig::check_syntax(ODR odr, const char *name, xfree(*stylesheet); *stylesheet = xstrdup(match_stylesheet); } - if (schema && match_schema) + if (schema && match_identifier) { xfree(*schema); - *schema = xstrdup(match_schema); + *schema = xstrdup(match_identifier); } if (match_marcxml) { @@ -705,7 +700,6 @@ char *Yaz_ProxyConfig::get_explain(ODR odr, const char *name, const char *db, xmlDocSetRootElement(doc, ptr2); xmlChar *buf_out; - int len_out; xmlDocDumpMemory(doc, &buf_out, len); char *content = (char*) odr_malloc(odr, *len); memcpy(content, buf_out, *len);