From: Adam Dickmeiss Date: Tue, 10 Oct 2006 09:13:52 +0000 (+0000) Subject: Changes for retrieval module: if backend schema is omitted, use X-Git-Tag: YAZ.2.1.36~9 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=a9927a5dcb277fa27a803b0ed74989175eadd6a9;p=yaz-moved-to-github.git Changes for retrieval module: if backend schema is omitted, use schema as specified in name attribute. And if name attribute is omitted use schema as specified by client. --- diff --git a/src/retrieval.c b/src/retrieval.c index 12cf9d8..c9ee789 100644 --- a/src/retrieval.c +++ b/src/retrieval.c @@ -2,7 +2,7 @@ * Copyright (C) 2005-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: retrieval.c,v 1.11 2006-07-06 10:17:53 adam Exp $ + * $Id: retrieval.c,v 1.12 2006-10-10 09:13:52 adam Exp $ */ /** * \file retrieval.c @@ -293,9 +293,21 @@ int yaz_retrieval_request(yaz_retrieval_t p, else *match_schema = 0; if (backend_schema) - *backend_schema = el->backend_name; + { + if (el->backend_name) + *backend_schema = el->backend_name; + else if (el->name) + *backend_schema = el->name; + else + *backend_schema = schema; + } if (backend_syntax) - *backend_syntax = el->backend_syntax; + { + if (el->backend_syntax) + *backend_syntax = el->backend_syntax; + else + *backend_syntax = el->syntax; + } if (rc) *rc = el->record_conv; return 0;