From e8001c3381e00a846e96fab5a1c6f7ca00df4f55 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 9 Oct 2015 16:15:42 +0200 Subject: [PATCH] Fix RPN to CQL rejects local Bib-1 attribute set YAZ-861 --- src/cqltransform.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cqltransform.c b/src/cqltransform.c index b5fe140..1118dc2 100644 --- a/src/cqltransform.c +++ b/src/cqltransform.c @@ -339,9 +339,11 @@ const char *cql_lookup_reverse(cql_transform_t ct, for (j = 0; j < attributes->num_attributes; j++) { /* actual attribute */ - Z_AttributeElement *a_ae = attributes->attributes[j]; - int r = compare_attr(e_ae, a_ae); - if (r == 0) + Z_AttributeElement a_ae = *attributes->attributes[j]; + if (a_ae.attributeSet && &e_ae->attributeSet && + !oid_oidcmp(a_ae.attributeSet, yaz_oid_attset_bib_1)) + a_ae.attributeSet = 0; + if (!compare_attr(e_ae, &a_ae)) break; } if (j == attributes->num_attributes) -- 1.7.10.4