X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy.pm;h=f8150b1700e995abf3e54418b9f8e81784d66dd4;hb=9327db699edd0ad47831d19cce50163242b270d6;hp=3bd1aafa7391b8fd2d3e356640d53308d73343c3;hpb=df249d500ca3cfefbc1e0fd82e3a7c1bd7f85142;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index 3bd1aaf..f8150b1 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.89 2007-09-20 10:14:37 mike Exp $ +# $Id: IRSpy.pm,v 1.90 2008-07-16 11:42:13 mike Exp $ package ZOOM::IRSpy; @@ -238,7 +238,7 @@ sub _next_connection { my $h = _hash($target); my $hmodn = $h % $n; last if $hmodn == $i; - $this->log("irspy", "'$target' hash $h % $n = $hmodn != $i"); + #$this->log("irspy", "'$target' hash $h % $n = $hmodn != $i"); } } @@ -262,7 +262,9 @@ sub _hash { sub _irspy_to_zeerex { my $this = shift(); - my($conn, $save_xml) = @_; + my($conn) = @_; + + my $save_xml = $ENV{IRSPY_SAVE_XML}; my $irspy_doc = $conn->record()->{zeerex}->ownerDocument; if ($save_xml) { @@ -286,12 +288,12 @@ sub _irspy_to_zeerex { } -sub _rewrite_record { +sub _rewrite_irspy_record { my $this = shift(); my($conn) = @_; $conn->log("irspy", "rewriting XML record"); - my $rec = $this->_irspy_to_zeerex($conn, $ENV{IRSPY_SAVE_XML}); + my $rec = $this->_irspy_to_zeerex($conn); # Since IRSpy can run for a long time between writes back to the # database, it's quite possible for the server to have closed the @@ -431,7 +433,7 @@ sub check { } if (!defined $nextaddr) { $conn->log("irspy", "has no more tests: removing"); - $this->_rewrite_record($conn); + $this->_rewrite_irspy_record($conn); $conn->option(rewrote_record => 1); my $newconn = $this->_next_connection(); if (!defined $newconn) {