From: Adam Dickmeiss Date: Fri, 31 Aug 2007 21:23:45 +0000 (+0000) Subject: Option sru_version holds negotiated SRU/SRW version. X-Git-Tag: YAZ.3.0.12~17 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=c880dceeaeca4082b215a15eb48fd655cb7b62f7;p=yaz-moved-to-github.git Option sru_version holds negotiated SRU/SRW version. --- diff --git a/doc/zoom.xml b/doc/zoom.xml index f1a3f79..9a8a910 100644 --- a/doc/zoom.xml +++ b/doc/zoom.xml @@ -20,7 +20,7 @@ ZOOM_options_set_int(opt, name, value) ZOOM_connection_scan1 (ZOOM_connection c, ZOOM_query startterm) ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn) --> - + ZOOM &zoom; is an acronym for 'Z39.50 Object-Orientation Model' and is @@ -267,6 +267,14 @@ ZOOM_query_cql2rpn(ZOOM_query s, const char *str, ZOOM_connection conn) discover whether the server claims to support the specified operations. none + + sru_version + SRU/SRW version. Should be 1.1, or + 1.2. This is , prior to connect, the version + to offer (highest version). And following connect (in fact + first operation), holds the negotiated version with the server + (same or lower version). + 1.1 diff --git a/src/zoom-c.c b/src/zoom-c.c index 796d904..27ebf6d 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.143 2007-08-23 14:23:23 adam Exp $ + * $Id: zoom-c.c,v 1.144 2007-08-31 21:23:45 adam Exp $ */ /** * \file zoom-c.c @@ -1353,7 +1353,7 @@ static zoom_ret ZOOM_connection_send_init(ZOOM_connection c) odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.143 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.144 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = @@ -3926,6 +3926,8 @@ static void handle_http(ZOOM_connection c, Z_HTTP_Response *hres) soap_package->u.generic->no == 0) { Z_SRW_PDU *sr = (Z_SRW_PDU*) soap_package->u.generic->p; + + ZOOM_options_set(c->options, "sru_version", sr->srw_version); if (sr->which == Z_SRW_searchRetrieve_response) handle_srw_response(c, sr->u.response); else if (sr->which == Z_SRW_scan_response)