From 9b02d07037bf3651fd0a0a681c72610994cf6e5d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 20 Apr 2012 11:16:47 +0200 Subject: [PATCH] zoom: guess if invalid response was an auth failure --- src/filter_zoom.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/filter_zoom.cpp b/src/filter_zoom.cpp index b27ce0b..e871b97 100644 --- a/src/filter_zoom.cpp +++ b/src/filter_zoom.cpp @@ -303,10 +303,18 @@ void yf::Zoom::Backend::get_zoom_error(int *error, char **addinfo, *error = error0; else if (!strcmp(dset, "ZOOM")) { + *error = YAZ_BIB1_TEMPORARY_SYSTEM_ERROR; if (error0 == ZOOM_ERROR_INIT) *error = YAZ_BIB1_INIT_AC_AUTHENTICATION_SYSTEM_ERROR; - else - *error = YAZ_BIB1_TEMPORARY_SYSTEM_ERROR; + else if (error0 == ZOOM_ERROR_DECODE) + { + if (zoom_addinfo) + { + if (strstr(zoom_addinfo, "Authentication") || + strstr(zoom_addinfo, "authentication")) + *error = YAZ_BIB1_INIT_AC_AUTHENTICATION_SYSTEM_ERROR; + } + } } else *error = YAZ_BIB1_TEMPORARY_SYSTEM_ERROR; -- 1.7.10.4