X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy.pm;h=5cbd307ba36cea8ae303e80149674ceb669a8231;hb=25cff00d74ce9e0f4d9c41e50f52ef803d49711a;hp=d606b6ad150bf6e9bcc1ffba18f2e24a6217f37c;hpb=31a4a85969b4d333003c6616ea72574f025aae88;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index d606b6a..5cbd307 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.45 2006-10-30 16:13:49 mike Exp $ +# $Id: IRSpy.pm,v 1.47 2006-11-02 13:16:49 mike Exp $ package ZOOM::IRSpy; @@ -20,7 +20,6 @@ use ZOOM::IRSpy::Utils; our @ISA = qw(); our $VERSION = '0.02'; -our $irspy_ns = 'http://indexdata.com/irspy/1.0'; our $irspy_to_zeerex_xsl = dirname(__FILE__) . '/../../xsl/irspy2zeerex.xsl'; @@ -343,6 +342,7 @@ sub check { $conn->log("irspy", "has no more tests: removing"); splice @conn, $i0, 1; $this->_rewrite_record($conn); + $conn->option(rewrote_record => 1); next; } @@ -453,6 +453,27 @@ sub check { } $this->log("irspy", "exiting main loop"); + # Sanity checks: none of the following should ever happen + foreach my $conn (@{ $this->{connections} }) { + my $test = $conn->option("current_test_address"); + my $next = $this->_next_test($test); + if (defined $next) { + warn "$conn (in test '$test') has queued test '$next'"; + } + if (my $task = $conn->current_task()) { + warn "$conn still has an active task $task"; + } + if (my $task = $conn->next_task()) { + warn "$conn still has a queued task $task"; + } + if (!$conn->is_idle()) { + warn "$conn is not idle (still has ZOOM-C level tasks queued)"; + } + if (!$conn->option("rewrote_record")) { + warn "$conn did not rewrite its ZeeRex record"; + } + } + return $nskipped; }