From: Adam Dickmeiss Date: Wed, 13 Jun 2001 20:47:40 +0000 (+0000) Subject: When error is returned from present handler, non-surrogate diagnostic X-Git-Tag: YAZ.1.8~79 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=834b8cc2eae2f3ebf8256cacf8cc137bcc91c038 When error is returned from present handler, non-surrogate diagnostic is returned in present response (and fetch handler is no longer called). --- diff --git a/CHANGELOG b/CHANGELOG index d0bf821..d75d1f2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,8 @@ Possible compatibility problems with earlier versions marked with '*'. +When error is returned from present handler, non-surrogate diagnostic +is returned in present response (and fetch handler is no longer called). + * Minor adjustments to pquery parser (PQF). Token characters may be escaped by using backslash (C-style). diff --git a/debian/changelog b/debian/changelog index 877019b..b12057b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,8 @@ +yaz (1.7-1) experimental; urgency=low + * Build in sub directory build instead of root directory. + + -- Adam Dickmeiss Wed, 06 Jun 2001 22:33:00 +0200 + yaz (1.7) experimental; urgency=low * Initial version. diff --git a/debian/rules b/debian/rules index c08f2d7..c260d65 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,8 @@ #!/usr/bin/make -f # Debian rules for YAZ -# $Id: rules,v 1.1 2001-05-28 12:44:03 adam Exp $ +# $Id: rules,v 1.2 2001-06-13 20:47:40 adam Exp $ # +# Modified from: # Sample debian/rules file - for GNU Hello (1.3). # Copyright 1994,1995 by Ian Jackson. # I hereby give you perpetual unlimited permission to copy, @@ -11,19 +12,19 @@ # This file may have to be extensively modified package=yaz -version=1.0.0 +soversion=1.0.0 build: $(checkdir) - ./configure --prefix=/usr --enable-shared - $(MAKE) CFLAGS=-O2 - cd doc; $(MAKE) CFLAGS=-O2 + mkdir build + cd build; ../configure --prefix=/usr --enable-shared + cd build; $(MAKE) CFLAGS=-O2 + cd build/doc; $(MAKE) CFLAGS=-O2 touch build clean: $(checkdir) - rm -f build - -$(MAKE) -i distclean + rm -rf build rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars binary-indep: checkroot build @@ -39,17 +40,20 @@ binary-arch: checkroot build -d debian/tmp/usr/share/doc/$(package) install -m 755 debian/postinst debian/prerm debian/tmp/DEBIAN install -m 644 debian/shlibs debian/tmp/DEBIAN - $(MAKE) prefix=`pwd`/debian/tmp/usr install - install -m 644 doc/*.html debian/tmp/usr/share/doc/$(package) - install -m 644 doc/*.ps debian/tmp/usr/share/doc/$(package) - install -m 644 doc/*.txt debian/tmp/usr/share/doc/$(package) + cd build; $(MAKE) prefix=`pwd`/../debian/tmp/usr install + if test -f doc/yaz.txt; then \ + install -m 644 doc/*.html doc/*.ps doc/*.txt debian/tmp/usr/share/doc/$(package); \ + else \ + install -m 644 build/doc/*.html build/doc/*.ps build/doc/*.txt debian/tmp/usr/share/doc/$(package); \ + fi gzip debian/tmp/usr/share/doc/$(package)/*.ps gzip debian/tmp/usr/share/doc/$(package)/*.txt cp debian/copyright debian/tmp/usr/share/doc/$(package)/. cp debian/changelog debian/tmp/usr/share/doc/$(package)/changelog.Debian cp CHANGELOG debian/tmp/usr/share/doc/$(package)/changelog strip --strip-debug debian/tmp/usr/lib/*.a - strip --strip-unneeded debian/tmp/usr/lib/lib*.so.$(version) + strip --strip-unneeded debian/tmp/usr/lib/lib*.so.$(soversion) + cp debian/shlibs debian/shlibs.local dpkg-shlibdeps debian/tmp/usr/bin/yaz-client debian/tmp/usr/bin/yaz-ztest dpkg-gencontrol chown -R root.root debian/tmp diff --git a/server/seshigh.c b/server/seshigh.c index 7b8ac37..d8e174e 100644 --- a/server/seshigh.c +++ b/server/seshigh.c @@ -3,7 +3,11 @@ * See the file LICENSE for details. * * $Log: seshigh.c,v $ - * Revision 1.116 2001-05-16 07:21:36 adam + * Revision 1.117 2001-06-13 20:47:40 adam + * When error is returned from present handler, non-surrogate diagnostic + * is returned in present response (and fetch handler is no longer called). + * + * Revision 1.116 2001/05/16 07:21:36 adam * Accept any OID for record syntax. * * Revision 1.115 2001/03/25 21:55:12 adam @@ -1555,7 +1559,6 @@ static Z_APDU *process_presentRequest(association *assoc, request *reqb, oid_value form; Z_APDU *apdu; Z_PresentResponse *resp; - int *presst; int *next; int *num; @@ -1565,6 +1568,9 @@ static Z_APDU *process_presentRequest(association *assoc, request *reqb, form = VAL_NONE; else form = prefformat->value; + resp = (Z_PresentResponse *)odr_malloc (assoc->encode, sizeof(*resp)); + resp->records = 0; + resp->presentStatus = odr_intdup(assoc->encode, 0); if (assoc->init->bend_present) { bend_present_rr *bprr = (bend_present_rr *) @@ -1585,26 +1591,32 @@ static Z_APDU *process_presentRequest(association *assoc, request *reqb, if (!bprr->request) return 0; + if (bprr->errcode) + { + resp->records = diagrec(assoc, bprr->errcode, bprr->errstring); + *resp->presentStatus = Z_PRES_FAILURE; + } } apdu = (Z_APDU *)odr_malloc (assoc->encode, sizeof(*apdu)); - resp = (Z_PresentResponse *)odr_malloc (assoc->encode, sizeof(*resp)); - presst = odr_intdup(assoc->encode, 0); next = odr_intdup(assoc->encode, 0); - num = odr_intdup(assoc->encode, *req->numberOfRecordsRequested); + num = odr_intdup(assoc->encode, 0); apdu->which = Z_APDU_presentResponse; apdu->u.presentResponse = resp; resp->referenceId = req->referenceId; resp->otherInfo = 0; - resp->records = - pack_records(assoc, req->resultSetId, *req->resultSetStartPoint, - num, req->recordComposition, next, presst, form, - req->referenceId, req->preferredRecordSyntax); + if (!resp->records) + { + *num = *req->numberOfRecordsRequested; + resp->records = + pack_records(assoc, req->resultSetId, *req->resultSetStartPoint, + num, req->recordComposition, next, resp->presentStatus, + form, req->referenceId, req->preferredRecordSyntax); + } if (!resp->records) return 0; resp->numberOfRecordsReturned = num; - resp->presentStatus = presst; resp->nextResultSetPosition = next; return apdu;