From 3c6dc64db7c2e18d4bd3e15c7140d90d3fa6978f Mon Sep 17 00:00:00 2001 From: Nahuel Angelinetti Date: Fri, 17 Oct 2008 09:38:13 +0200 Subject: [PATCH] Report to user the connections errors to z39.50 server, like timeout(10007), and refused(10000). Signed-off-by: Galen Charlton --- cataloguing/z3950_search.pl | 7 ++++++- .../prog/en/modules/cataloguing/z3950_search.tmpl | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cataloguing/z3950_search.pl b/cataloguing/z3950_search.pl index 1463e596c3..08b45d306f 100755 --- a/cataloguing/z3950_search.pl +++ b/cataloguing/z3950_search.pl @@ -106,6 +106,7 @@ else { my @id = $input->param('id'); my @oConnection; my @oResult; + my @errconn; my $s = 0; my $query; my $nterms; @@ -199,6 +200,9 @@ warn "query ".$query if $DEBUG; my ( $error, $errmsg, $addinfo, $diagset ) = $oConnection[$k]->error_x(); if ($error) { + if ($error =~ m/^(10000|10007)$/ ) { + push(@errconn, {'server' => $serverhost[$k]}); + } warn "$k $serverhost[$k] error $query: $errmsg ($error) $addinfo\n" if $DEBUG; @@ -263,7 +267,8 @@ warn "query ".$query if $DEBUG; breeding_loop => \@breeding_loop, server => $servername[$k], numberpending => $numberpending, - biblionumber => $biblionumber, + biblionumber => $biblionumber, + errconn => \@errconn ); output_html_with_http_headers $input, $cookie, $template->output if $numberpending == 0; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl index 97683dd877..3b47914978 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tmpl @@ -109,6 +109,9 @@ $.tablesorter.addParser({ + + Connection failed to +

Nothing found. ">Try another search.

-- 2.39.5