From: Adam Dickmeiss Date: Wed, 7 Jan 2004 13:24:12 +0000 (+0000) Subject: Always return full schema identifier in response X-Git-Tag: YAZPP.0.7.4.larry~13 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=91448f60da6e5c83dab8e8acb5ae71819c1bfb3a;p=yazpp-moved-to-github.git Always return full schema identifier in response --- diff --git a/include/yaz++/proxy.h b/include/yaz++/proxy.h index 0249ef7..ccdaebd 100644 --- a/include/yaz++/proxy.h +++ b/include/yaz++/proxy.h @@ -2,7 +2,7 @@ * Copyright (c) 1998-2004, Index Data. * See the file LICENSE for details. * - * $Id: proxy.h,v 1.28 2004-01-07 11:10:55 adam Exp $ + * $Id: proxy.h,v 1.29 2004-01-07 13:24:12 adam Exp $ */ #include @@ -67,7 +67,7 @@ private: int mycmp(const char *hay, const char *item, size_t len); #if HAVE_XSLT int check_schema(xmlNodePtr ptr, Z_RecordComposition *comp, - const char **found_schema, const char *schema_identifier); + const char *schema_identifier); xmlDocPtr m_docPtr; xmlNodePtr m_proxyPtr; void return_target_info(xmlNodePtr ptr, const char **url, diff --git a/src/yaz-proxy-config.cpp b/src/yaz-proxy-config.cpp index c849575..919c2ff 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.22 2004-01-07 13:24:12 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) {