X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=server%2Fseshigh.c;h=8d0f17f4876211939f84129a00ee0cf4e9b2bf11;hb=3bb2e157affd19490974257a252472716d7858b3;hp=d7e34a0226de57b640726f07e4b015660a7ee8fe;hpb=16bbe562b92ceb5129c779a2d772c068d6de028f;p=yaz-moved-to-github.git diff --git a/server/seshigh.c b/server/seshigh.c index d7e34a0..8d0f17f 100644 --- a/server/seshigh.c +++ b/server/seshigh.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2002, Index Data * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.125 2002-01-23 21:13:30 adam Exp $ + * $Id: seshigh.c,v 1.128 2002-03-20 14:36:00 adam Exp $ */ /* @@ -45,6 +45,7 @@ #include #include #include +#include #include @@ -590,6 +591,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) assoc->init->auth = req->idAuthentication; assoc->init->referenceId = req->referenceId; assoc->init->implementation_version = 0; + assoc->init->implementation_id = 0; assoc->init->implementation_name = 0; assoc->init->bend_sort = NULL; assoc->init->bend_search = NULL; @@ -702,6 +704,16 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) resp->implementationName = "GFS/YAZ"; + if (assoc->init->implementation_id) + { + char *nv = (char *) + odr_malloc (assoc->encode, + strlen(assoc->init->implementation_id) + 10 + + strlen(resp->implementationId)); + sprintf (nv, "%s / %s", + resp->implementationId, assoc->init->implementation_id); + resp->implementationId = nv; + } if (assoc->init->implementation_name) { char *nv = (char *) @@ -759,7 +771,7 @@ static Z_Records *diagrec(association *assoc, int error, char *addinfo) odr_malloc (assoc->encode, sizeof(*dr)); yaz_log(LOG_LOG, "[%d] %s %s%s", error, diagbib1_str(error), - addinfo ? " -- " : "", addinfo ? addinfo : "", error); + addinfo ? " -- " : "", addinfo ? addinfo : ""); rec->which = Z_Records_NSD; rec->u.nonSurrogateDiagnostic = dr; dr->diagnosticSetId = @@ -936,7 +948,7 @@ static Z_Records *pack_records(association *a, char *setname, int start, } else /* too big entirely */ { - yaz_log(LOG_DEBUG, "Record > maxrcdsz"); + yaz_log(LOG_LOG, "Record > maxrcdsz this=%d max=%d", this_length, a->maximumRecordSize); reclist->records[reclist->num_records] = surrogatediagrec(a, freq.basename, 17, 0); reclist->num_records++; @@ -1011,6 +1023,7 @@ static Z_APDU *process_searchRequest(association *assoc, request *reqb, bsrr->errcode = 0; bsrr->hits = 0; bsrr->errstring = NULL; + bsrr->search_info = NULL; (assoc->init->bend_search)(assoc->backend, bsrr); if (!bsrr->request) return 0; @@ -1121,6 +1134,7 @@ static Z_APDU *response_searchRequest(association *assoc, request *reqb, resp->presentStatus = 0; } } + resp->additionalSearchInfo = bsrt->search_info; return apdu; } @@ -1225,7 +1239,6 @@ static Z_APDU *process_scanRequest(association *assoc, request *reqb, int *fd) Z_ListEntries *ents = (Z_ListEntries *) odr_malloc (assoc->encode, sizeof(*ents)); Z_DiagRecs *diagrecs_p = NULL; - oident *attent; oident *attset; bend_scan_rr *bsrr = (bend_scan_rr *) odr_malloc (assoc->encode, sizeof(*bsrr));