_irspy_to_zeerex() now checks the IRSPY_SAVE_XML environment variable
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy.pm
index 3bd1aaf..f5df4b5 100644 (file)
@@ -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) {
@@ -291,7 +293,7 @@ sub _rewrite_record {
     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