From: Mike Taylor Date: Wed, 16 Nov 2005 16:03:51 +0000 (+0000) Subject: Add ZOOM_connection_diagset() X-Git-Tag: YAZ.2.1.10~7 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=4102d95bf434baaf92b1a8db63d1f7396c8e469f;p=yaz-moved-to-github.git Add ZOOM_connection_diagset() --- diff --git a/doc/zoom.xml b/doc/zoom.xml index 3bd7080..5ca4272 100644 --- a/doc/zoom.xml +++ b/doc/zoom.xml @@ -3,6 +3,8 @@ ZOOM_connection_errcode(c) ZOOM_connection_errmsg(c) ZOOM_connection_addinfo(c) +ZOOM_connection_addinfo(c) +ZOOM_connection_diagset(c); ZOOM_diag_str(error) ZOOM_resultset_record_immediate(s, pos) ZOOM_resultset_cache_reset(r) @@ -16,7 +18,7 @@ ZOOM_options_get_bool(opt, name, defa) ZOOM_options_get_int(opt, name, defa) ZOOM_options_set_int(opt, name, value) --> - + ZOOM &zoom; is an acronym for 'Z39.50 Object-Orientation Model' and is diff --git a/include/yaz/zoom.h b/include/yaz/zoom.h index 5637d3a..12043ac 100644 --- a/include/yaz/zoom.h +++ b/include/yaz/zoom.h @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom.h,v 1.29 2005-11-08 16:51:34 mike Exp $ + * $Id: zoom.h,v 1.30 2005-11-16 16:03:51 mike Exp $ */ /** * \file zoom.h @@ -92,6 +92,9 @@ ZOOM_connection_errmsg (ZOOM_connection c); /* returns additional info */ ZOOM_API(const char *) ZOOM_connection_addinfo (ZOOM_connection c); +/* returns diagnostic set */ +ZOOM_API(const char *) +ZOOM_connection_diagset (ZOOM_connection c); /* translates error code into human-readable string */ ZOOM_API(const char *) ZOOM_diag_str (int error); diff --git a/src/zoom-c.c b/src/zoom-c.c index 7795fb5..b7709e4 100644 --- a/src/zoom-c.c +++ b/src/zoom-c.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2005, Index Data ApS * See the file LICENSE for details. * - * $Id: zoom-c.c,v 1.51 2005-11-08 16:52:29 mike Exp $ + * $Id: zoom-c.c,v 1.52 2005-11-16 16:07:52 mike Exp $ */ /** * \file zoom-c.c @@ -1063,7 +1063,7 @@ static zoom_ret ZOOM_connection_send_init (ZOOM_connection c) ZOOM_options_get(c->options, "implementationName"), odr_prepend(c->odr_out, "ZOOM-C", ireq->implementationName)); - version = odr_strdup(c->odr_out, "$Revision: 1.51 $"); + version = odr_strdup(c->odr_out, "$Revision: 1.52 $"); if (strlen(version) > 10) /* check for unexpanded CVS strings */ version[strlen(version)-2] = '\0'; ireq->implementationVersion = odr_prepend(c->odr_out, @@ -3592,6 +3592,14 @@ ZOOM_connection_addinfo (ZOOM_connection c) } ZOOM_API(const char *) +ZOOM_connection_diagset (ZOOM_connection c) +{ + const char *diagset; + ZOOM_connection_error_x (c, 0, 0, &diagset); + return diagset; +} + +ZOOM_API(const char *) ZOOM_diag_str (int error) { switch (error)