X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=server%2Fseshigh.c;h=8fdef834bb686237a6298d128f1107689f38af4c;hb=61332f860c40c483d1283532e5fb225daee75e67;hp=f05c05010e59008c10ecaf887998cfe32bb866e2;hpb=4ae699c927bc26f3550d1a8ca911e8d1fe75dbfc;p=yaz-moved-to-github.git diff --git a/server/seshigh.c b/server/seshigh.c index f05c050..8fdef83 100644 --- a/server/seshigh.c +++ b/server/seshigh.c @@ -4,7 +4,16 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: seshigh.c,v $ - * Revision 1.57 1996-01-02 08:57:47 quinn + * Revision 1.60 1996-05-30 11:03:10 quinn + * Fixed NextresultSetPosition bug fixed. + * + * Revision 1.59 1996/05/14 09:26:46 quinn + * Added attribute set to scan backend + * + * Revision 1.58 1996/02/20 12:53:04 quinn + * Chanes to SCAN + * + * Revision 1.57 1996/01/02 08:57:47 quinn * Changed enums in the ASN.1 .h files to #defines. Changed oident.class to oclass * * Revision 1.56 1995/12/14 11:09:57 quinn @@ -915,6 +924,7 @@ static Z_Records *pack_records(association *a, char *setname, int start, reclist.records[reclist.num_records] = surrogatediagrec(a->proto, fres->basename, 16, 0); reclist.num_records++; + *next = fres->last_in_set ? 0 : recno + 1; continue; } } @@ -924,6 +934,7 @@ static Z_Records *pack_records(association *a, char *setname, int start, reclist.records[reclist.num_records] = surrogatediagrec(a->proto, fres->basename, 17, 0); reclist.num_records++; + *next = fres->last_in_set ? 0 : recno + 1; continue; } } @@ -1192,6 +1203,7 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb, int *fd) static Z_Entry *tab[SCAN_MAX_ENTRIES]; bend_scanrequest srq; bend_scanresult *srs; + oident *attset; logf(LOG_LOG, "Got scanrequest"); apdu.which = Z_APDU_scanResponse; @@ -1223,6 +1235,11 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb, int *fd) srq.basenames = req->databaseNames; srq.num_entries = *req->numberOfTermsRequested; srq.term = req->termListAndStartPoint; + if (!(attset = oid_getentbyoid(req->attributeSet)) || + attset->oclass != CLASS_RECSYN) + srq.attributeset = VAL_NONE; + else + srq.attributeset = attset->value; srq.term_position = req->preferredPositionInResponse ? *req->preferredPositionInResponse : 1; if (!(srs = bend_scan(assoc->backend, &srq, 0))) @@ -1257,8 +1274,10 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb, int *fd) e->which = Z_Entry_termInfo; e->u.termInfo = t = odr_malloc(assoc->encode, sizeof(*t)); t->suggestedAttributes = 0; + t->displayTerm = 0; t->alternativeTerm = 0; t->byAttributes = 0; + t->otherTermInfo = 0; t->globalOccurrences = &srs->entries[i].occurrences; t->term = odr_malloc(assoc->encode, sizeof(*t->term)); t->term->which = Z_Term_general;