X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fseshigh.c;h=e395981764cb6f3ecd2cbd9ac6e09a204057ecd0;hb=0d3acc914a510c397cb8f65bbd957697284c41d9;hp=711d7fefe5b7382c0c7d321370f4f59dcc11701c;hpb=43a7aff23f364fd3fac6e9746c53cda01be13738;p=yaz-moved-to-github.git diff --git a/src/seshigh.c b/src/seshigh.c index 711d7fe..e395981 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.59 2005-08-22 20:34:21 adam Exp $ + * $Id: seshigh.c,v 1.62 2005-09-12 09:13:26 adam Exp $ */ /** * \file seshigh.c @@ -243,6 +243,7 @@ static void do_close_req(association *a, int reason, char *message, request_release(req); yaz_log(log_requestdetail, "v2 client. No Close PDU"); iochan_setevent(a->client_chan, EVENT_TIMEOUT); /* force imm close */ + a->cs_put_mask = 0; } a->state = ASSOC_DEAD; } @@ -722,7 +723,8 @@ static void srw_bend_search(association *assoc, request *req, rr.basenames = &srw_req->database; rr.referenceId = 0; rr.srw_sortKeys = 0; - + rr.srw_setname = 0; + rr.srw_setnameIdleTime = 0; rr.query = (Z_Query *) odr_malloc (assoc->decode, sizeof(*rr.query)); rr.query->u.type_1 = 0; @@ -827,6 +829,13 @@ static void srw_bend_search(association *assoc, request *req, start, number, rr.hits); srw_res->numberOfRecords = odr_intdup(assoc->encode, rr.hits); + if (rr.srw_setname) + { + srw_res->resultSetId = + odr_strdup(assoc->encode, rr.srw_setname ); + srw_res->resultSetIdleTime = + odr_intdup(assoc->encode, *rr.srw_setnameIdleTime ); + } if (number > 0) { int i; @@ -1595,7 +1604,10 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) if (control_association(assoc, get_vhost(req->otherInfo), 1)) cb = statserv_getcontrol(); /* got control block for backend */ - + + if (cb && assoc->backend) + (*cb->bend_close)(assoc->backend); + yaz_log(log_requestdetail, "Got initRequest"); if (req->implementationId) yaz_log(log_requestdetail, "Id: %s", @@ -1620,7 +1632,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) negotiation->which == Z_CharSetandLanguageNegotiation_proposal) assoc->init->charneg_request = negotiation; } - + assoc->backend = 0; if (cb) { @@ -1764,7 +1776,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.59 $"); + version = odr_strdup(assoc->encode, "$Revision: 1.62 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode, @@ -2012,6 +2024,8 @@ static Z_APDU *process_searchRequest(association *assoc, request *reqb, bsrr->referenceId = req->referenceId; save_referenceId (reqb, bsrr->referenceId); bsrr->srw_sortKeys = 0; + bsrr->srw_setname = 0; + bsrr->srw_setnameIdleTime = 0; yaz_log (log_requestdetail, "ResultSet '%s'", req->resultSetName); if (req->databaseNames)