X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fseshigh.c;h=f6dedb5d50673cfc18a7a82f39b9dc7c54417d29;hp=d3552609518381e1168f9dab40fc719c16205d9e;hb=65f297c24c59e95f860f29928d3588c5dc98ba4c;hpb=750bc4f7094d6de74c64cfd028d66ae1261be1d1;ds=sidebyside diff --git a/src/seshigh.c b/src/seshigh.c index d355260..f6dedb5 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.78 2006-05-08 10:16:47 adam Exp $ + * $Id: seshigh.c,v 1.79 2006-05-08 19:48:26 adam Exp $ */ /** * \file seshigh.c @@ -599,6 +599,7 @@ static int retrieve_fetch(association *assoc, bend_fetch_rr *rr) &rc, &backend_schema, &backend_syntax); + yaz_log(YLOG_LOG, "yaz_retrieval_request r=%d", r); if (r == -1) /* error ? */ { const char *details = yaz_retrieval_get_error( @@ -609,7 +610,7 @@ static int retrieve_fetch(association *assoc, bend_fetch_rr *rr) rr->errstring = odr_strdup(rr->stream, details); return -1; } - else if (r == 1) + else if (r == 1 || r == 3) { const char *details = input_schema; rr->errcode = YAZ_BIB1_ELEMENT_SET_NAMES_UNSUPP; @@ -620,19 +621,12 @@ static int retrieve_fetch(association *assoc, bend_fetch_rr *rr) else if (r == 2) { rr->errcode = YAZ_BIB1_RECORD_SYNTAX_UNSUPP; - return -1; - } - else if (r == 3) - { - const char *details = input_schema; - rr->errcode = YAZ_BIB1_ELEMENT_SET_NAMES_UNSUPP; - if (details) - rr->errstring = odr_strdup(rr->stream, details); - return -1; - } - else if (r == 4) - { - rr->errcode = YAZ_BIB1_RECORD_NOT_AVAILABLE_IN_REQUESTED_SYNTAX; + if (input_syntax_raw) + { + char oidbuf[OID_STR_MAX]; + oid_to_dotstring(input_syntax_raw, oidbuf); + rr->errstring = odr_strdup(rr->stream, oidbuf); + } return -1; } if (backend_schema) @@ -2241,7 +2235,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) assoc->init->implementation_name, odr_prepend(assoc->encode, "GFS", resp->implementationName)); - version = odr_strdup(assoc->encode, "$Revision: 1.78 $"); + version = odr_strdup(assoc->encode, "$Revision: 1.79 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode,