From 54bdfe7f13daefbb38de9d49b50998c4a4ba1857 Mon Sep 17 00:00:00 2001 From: Sebastian Hammer Date: Fri, 17 Feb 1995 15:17:51 +0000 Subject: [PATCH] Bug fix --- zlayer/zaccess.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/zlayer/zaccess.c b/zlayer/zaccess.c index 5cdb65b..be3316a 100644 --- a/zlayer/zaccess.c +++ b/zlayer/zaccess.c @@ -2,7 +2,10 @@ * Europagate, 1995 * * $Log: zaccess.c,v $ - * Revision 1.8 1995/02/17 14:48:41 quinn + * Revision 1.9 1995/02/17 15:17:51 quinn + * Bug fix + * + * Revision 1.8 1995/02/17 14:48:41 quinn * 'nother bug in present * * Revision 1.7 1995/02/17 14:42:21 quinn @@ -384,9 +387,9 @@ const struct zass_presentent *zass_present(ZASS a, char *resname, int start, } do { - gw_log(ZASS_DEBUG, ZASS_TYPE, "Fetching %d records from # %d", num, + gw_log(ZASS_DEBUG, ZASS_TYPE, "Fetching %d records from # %d", num - r.num, start); - pdu = PresentRequest_CreateInitAllASCII(0, resname, start, num, "F", + pdu = PresentRequest_CreateInitAllASCII(0, resname, start, num - r.num, "F", USMARC_OID); if (!pdu) { @@ -428,7 +431,7 @@ const struct zass_presentent *zass_present(ZASS a, char *resname, int start, } r.nextpos = PresentResponse_GetNextResultSetPosition(pdu); start = r.nextpos; - num -= r.num; + r.num; switch(PresentResponse_GetRecordType(pdu)) { case RESPONSERECORDS_TAG: @@ -442,7 +445,7 @@ const struct zass_presentent *zass_present(ZASS a, char *resname, int start, } PresentResponse_Destroy(pdu); } - while (num); + while (num - r.num); *rec = 0; return &r; -- 1.7.10.4