X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=src%2Fseshigh.c;h=6349c4e0881c366a8dc4c90d8a9f48beebd9d716;hp=9906fa44016af81400bb57e09aeeaca2aa6790c0;hb=725fc033b729b22a1e0cfba614192b6fbfaeda4f;hpb=97554b23cfc19394bb77f7f3c4bf0c8abf89297b diff --git a/src/seshigh.c b/src/seshigh.c index 9906fa4..6349c4e 100644 --- a/src/seshigh.c +++ b/src/seshigh.c @@ -2,7 +2,7 @@ * Copyright (c) 1995-2004, Index Data * See the file LICENSE for details. * - * $Id: seshigh.c,v 1.20 2004-02-14 15:58:42 adam Exp $ + * $Id: seshigh.c,v 1.24 2004-05-10 07:48:56 adam Exp $ */ /* @@ -471,6 +471,7 @@ static int srw_bend_init(association *assoc) ce = yaz_set_proposal_charneg(assoc->decode, &encoding, 1, 0, 0, 1); assoc->init->charneg_request = ce->u.charNeg3; #endif + assoc->backend = 0; if (!(binitres = (*cb->bend_init)(assoc->init))) { yaz_log(LOG_WARN, "Bad response from backend."); @@ -752,6 +753,7 @@ static void srw_bend_explain(association *assoc, request *req, rr.print = assoc->print; rr.explain_buf = 0; rr.database = srw_req->database; + rr.schema = "http://explain.z3950.org/dtd/2.0/"; (*assoc->init->bend_explain)(assoc->backend, &rr); if (rr.explain_buf) { @@ -857,6 +859,7 @@ static void process_http_request(association *assoc, request *req) } else { + yaz_log(LOG_LOG, "generate soap error"); http_code = 500; z_soap_error(assoc->encode, soap_package, "SOAP-ENV:Client", "Bad method", 0); @@ -1195,6 +1198,7 @@ static Z_APDU *process_initRequest(association *assoc, request *reqb) assoc->init->charneg_request = negotiation; } + assoc->backend = 0; if (!(binitres = (*cb->bend_init)(assoc->init))) { yaz_log(LOG_WARN, "Bad response from backend."); @@ -1317,7 +1321,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.20 $"); + version = odr_strdup(assoc->encode, "$Revision: 1.24 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode, @@ -1412,6 +1416,7 @@ static Z_External *init_diagnostics(ODR odr, int error, char *addinfo) e->which = Z_DiagnosticFormat_s_defaultDiagRec; e->u.defaultDiagRec = justdiag(odr, error, addinfo); + e->message = 0; return x; } @@ -1494,7 +1499,7 @@ static Z_Records *pack_records(association *a, char *setname, int start, records->u.databaseOrSurDiagnostics = reclist; reclist->num_records = 0; reclist->records = list; - *pres = Z_PRES_SUCCESS; + *pres = Z_PresentStatus_success; *num = 0; *next = 0; @@ -1538,7 +1543,7 @@ static Z_Records *pack_records(association *a, char *setname, int start, if (!freq.surrogate_flag) { char s[20]; - *pres = Z_PRES_FAILURE; + *pres = Z_PresentStatus_failure; /* for 'present request out of range', set addinfo to record position if not set */ if (freq.errcode == 13 && freq.errstring == 0) @@ -1568,7 +1573,7 @@ static Z_Records *pack_records(association *a, char *setname, int start, if (this_length <= a->preferredMessageSize && recno > start) { yaz_log(LOG_DEBUG, " Dropped last normal-sized record"); - *pres = Z_PRES_PARTIAL_2; + *pres = Z_PresentStatus_partial_2; break; } /* record can only be fetched by itself */ @@ -1688,7 +1693,7 @@ static Z_APDU *response_searchRequest(association *assoc, request *reqb, int *nulint = odr_intdup (assoc->encode, 0); bool_t *sr = odr_intdup(assoc->encode, 1); int *next = odr_intdup(assoc->encode, 0); - int *none = odr_intdup(assoc->encode, Z_RES_NONE); + int *none = odr_intdup(assoc->encode, Z_SearchResponse_none); apdu->which = Z_APDU_searchResponse; apdu->u.searchResponse = resp; @@ -1834,7 +1839,7 @@ static Z_APDU *process_presentRequest(association *assoc, request *reqb, if (bprr->errcode) { resp->records = diagrec(assoc, bprr->errcode, bprr->errstring); - *resp->presentStatus = Z_PRES_FAILURE; + *resp->presentStatus = Z_PresentStatus_failure; } } apdu = (Z_APDU *)odr_malloc (assoc->encode, sizeof(*apdu)); @@ -2048,7 +2053,7 @@ static Z_APDU *process_sortRequest(association *assoc, request *reqb, bsrr->stream = assoc->encode; bsrr->print = assoc->print; - bsrr->sort_status = Z_SortStatus_failure; + bsrr->sort_status = Z_SortResponse_failure; bsrr->errcode = 0; bsrr->errstring = 0;