From: Adam Dickmeiss Date: Fri, 20 Apr 2012 09:16:47 +0000 (+0200) Subject: zoom: guess if invalid response was an auth failure X-Git-Tag: v1.3.30~6 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=9b02d07037bf3651fd0a0a681c72610994cf6e5d;p=metaproxy-moved-to-github.git zoom: guess if invalid response was an auth failure --- 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;