From 496846879a6674853c2a06de94a55c37fa04f648 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 15 Mar 1996 14:43:44 +0000 Subject: [PATCH] Multiple-target searches handles cancel operation now. --- www/nwi.egw | 4 +--- www/nwiutil.tcl | 4 ++-- www/z39util.tcl | 38 ++++++++++++++++++++++++++++++++------ 3 files changed, 35 insertions(+), 11 deletions(-) diff --git a/www/nwi.egw b/www/nwi.egw index 75209c3..fe69daa 100644 --- a/www/nwi.egw +++ b/www/nwi.egw @@ -1,6 +1,6 @@ { -# $Id: nwi.egw,v 1.4 1996/03/14 11:50:46 adam Exp $ +# $Id: nwi.egw,v 1.5 1996/03/15 14:43:44 adam Exp $ source ztargets.conf set scriptQuery nwi.egw @@ -82,8 +82,6 @@ foreach t { {nwi.ub2.lu.se/sverige} {nwi.ub2.lu.se/new_nor_lib} - {localhost:9999/test} - {localhost:210/Default} } { html {This page is maintained by } html { Adam Dickmeiss .} - html {Last modified March 14, 1996.
} + html {Last modified March 15, 1996.
} } diff --git a/www/z39util.tcl b/www/z39util.tcl index 36a28a1..b71172d 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.41 1996/03/14 11:50:51 adam Exp $ +# $Id: z39util.tcl,v 1.42 1996/03/15 14:43:45 adam Exp $ # proc saveState {} { uplevel #0 { @@ -1134,7 +1134,20 @@ proc z39msearch {setNo elements start number cache} { } while {$zleft > 0} { egw_log debug "Waiting for init response" - if {[catch {egw_wait zleft 20}]} { + if {[catch {egw_wait zleft 20} reason]} { + if {![string compare $reason cancel]} { + for {set i 1} {$i <= $not} {incr i} { + set zstatus($i) -1 + catch {z39$i disconnect} + } + return + } else { + for {set i 1} {$i <= $not} {incr i} { + if {$zstatus($i) == -1} { + catch {z39$i disconnect} + } + } + } break } } @@ -1241,9 +1254,24 @@ proc z39msearch {setNo elements start number cache} { } } } + + while {$zleft > 0} { egw_log debug "Waiting for search/present response" - if {[catch {egw_wait zleft 60}]} { + if {[catch {egw_wait zleft 60} reason]} { + if {![string compare $reason cancel]} { + for {set i 1} {$i <= $not} {incr i} { + catch {z39$i disconnect} + set zstatus($i) -1 + } + return + } else { + for {set i 1} {$i <= $not} {incr i} { + if {$zstatus($i) != 2} { + catch {z39$i disconnect} + } + } + } break } } @@ -1784,9 +1812,7 @@ proc button-scan-window {setNo} { proc maintenance {} { html {
This page is maintained by } html { Peter Wad Hansen .} - html {Last modified 29. january 1996.
} - html { This and the following pages are under construction and } - html {will continue to be so until the end of January 1996.} + html {Last modified March 15, 1996.
} } proc splitHostSpec {host} { -- 1.7.10.4