From c18ecdaa7ecb2cbc0dff2eebc40e50b07239e339 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 15 Jun 2006 12:53:56 +0000 Subject: [PATCH] hanged bend_update_rr so that diagnostics are stored in uri, message and details.. Previously diagnostics were stored in errcode, errstring. Patch by Ko van der Sloot. Breaks binary compatibility.. but he's probably the only one affected. --- NEWS | 5 +++++ include/yaz/backend.h | 7 ++++--- src/seshigh.c | 23 ++++++++++++++--------- 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 8cbcb82..113c567 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,8 @@ +Changed SRU update structure bend_update_rr so that SRU diagnostics are +stored in uri, message and details.. Previously diagnostics were stored +in errcode, errstring. Patch by Ko van der Sloot. Breaks binary +compatibility.. but he's probably the only one affected, so. + Added support for CCL, compiled on the client side, in ZOOM-C. This is invoked using ZOOM_query_ccl2rpn() with the CCL configuration as input; the resulting query objects can be used for for searching with diff --git a/include/yaz/backend.h b/include/yaz/backend.h index 4f7194f..470f6a6 100644 --- a/include/yaz/backend.h +++ b/include/yaz/backend.h @@ -23,7 +23,7 @@ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. * - * $Id: backend.h,v 1.36 2006-03-22 13:55:06 mike Exp $ + * $Id: backend.h,v 1.37 2006-06-15 12:53:57 adam Exp $ */ /** @@ -164,8 +164,9 @@ typedef struct bend_update_rr { Z_SRW_extra_record *response_extra_record; char *extra_request_data; char *extra_response_data; - int errcode; - char *errstring; + char *uri; + char *message; + char *details; } bend_update_rr; /* delete handler */ diff --git a/src/seshigh.c b/src/seshigh.c index 6b0f80e..6e683f4 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.85 2006-05-31 16:20:41 quinn Exp $ + * $Id: seshigh.c,v 1.86 2006-06-15 12:53:58 adam Exp $ */ /** * \file seshigh.c @@ -1440,8 +1440,9 @@ static void srw_bend_update(association *assoc, request *req, rr.response_extra_record = 0; rr.extra_request_data = 0; rr.extra_response_data = 0; - rr.errcode = 0; - rr.errstring = 0; + rr.uri = 0; + rr.message = 0; + rr.details = 0; yaz_log(YLOG_DEBUG, "basename = %s", rr.basenames[0] ); yaz_log(YLOG_DEBUG, "Operation = %s", rr.operation ); @@ -1520,6 +1521,7 @@ static void srw_bend_update(association *assoc, request *req, } else if ( !strcmp( rr.operation, "insert" ) ) { + rr.record_id = srw_req->recordId; if ( srw_req->record.recordSchema == 0 ){ yaz_add_srw_diagnostic(assoc->encode, &srw_res->diagnostics, &srw_res->num_diagnostics, @@ -1566,11 +1568,14 @@ static void srw_bend_update(association *assoc, request *req, return; } } - if (rr.errcode) - yaz_add_srw_diagnostic(assoc->encode, - &srw_res->diagnostics, - &srw_res->num_diagnostics, - rr.errcode, rr.errstring); + + if (rr.uri) + yaz_add_srw_diagnostic_uri(assoc->encode, + &srw_res->diagnostics, + &srw_res->num_diagnostics, + rr.uri, + rr.message, + rr.details); srw_res->recordId = rr.record_id; srw_res->operationStatus = rr.operation_status; srw_res->recordVersion = rr.record_version; @@ -2282,7 +2287,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.85 $"); + version = odr_strdup(assoc->encode, "$Revision: 1.86 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; resp->implementationVersion = odr_prepend(assoc->encode, -- 1.7.10.4