X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy.pm;h=f8150b1700e995abf3e54418b9f8e81784d66dd4;hb=6630d9e88e68aa87c0c27ea58c3b11140480891d;hp=13e63215475d771646b068f8aaba437e4d7debee;hpb=d720e9fdc6326e24bb4a9fabc3180ecafa90919d;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index 13e6321..f8150b1 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -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) {