zoom: Init rejected wo diagnostics maps to Bib-1:1014
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 20 Apr 2012 08:54:41 +0000 (10:54 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 20 Apr 2012 09:00:15 +0000 (11:00 +0200)
Bib-1 1014, "Init/AC: Authentication System error", seems pretty
generic. We don't know why the init would fail; IP, user, block IP, etc.
sru_z3950 filter maps this to SRU diagnostic 3: "Authentication error".

src/filter_zoom.cpp

index 34b3084..b27ce0b 100644 (file)
@@ -301,6 +301,13 @@ void yf::Zoom::Backend::get_zoom_error(int *error, char **addinfo,
             *error = yaz_diag_srw_to_bib1(error0);
         else if (!strcmp(dset, "Bib-1"))
             *error = error0;
+        else if (!strcmp(dset, "ZOOM"))
+        {
+            if (error0 == ZOOM_ERROR_INIT)
+                *error = YAZ_BIB1_INIT_AC_AUTHENTICATION_SYSTEM_ERROR;
+            else
+                *error = YAZ_BIB1_TEMPORARY_SYSTEM_ERROR;                
+        }
         else
             *error = YAZ_BIB1_TEMPORARY_SYSTEM_ERROR;