From 3094d68080f8bebd6c3b041899d37a3459796eb5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 29 Jul 2011 16:02:25 +0200 Subject: [PATCH] zoom fix: convert backend SRU diagnostics. The zoom filter speaks Z39.50 and thus SRU diagnostics must be converted to Z39.50 diagnostics. --- src/filter_zoom.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index cd233b5..2ac339d 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -198,7 +198,8 @@ void yf::Zoom::Backend::get_zoom_error(int *error, char **addinfo, { const char *msg = 0; const char *zoom_addinfo = 0; - *error = ZOOM_connection_error(m_connection, &msg, &zoom_addinfo); + const char *dset = 0; + *error = ZOOM_connection_error_x(m_connection, &msg, &zoom_addinfo, &dset); if (*error) { if (*error >= ZOOM_ERROR_CONNECT) @@ -218,6 +219,8 @@ void yf::Zoom::Backend::get_zoom_error(int *error, char **addinfo, } else { + if (dset && !strcmp(dset, "info:srw/diagnostic/1")) + *error = yaz_diag_srw_to_bib1(*error); *addinfo = (char *) odr_malloc( odr, 20 + (zoom_addinfo ? strlen(zoom_addinfo) : 0)); **addinfo = '\0'; -- 1.7.10.4