X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=lib%2FZOOM%2FIRSpy.pm;h=362e8b0b4047ef23a5060d4730e4885c5b5f747a;hb=784ad991a1700a08341f7fcfa7c02a683d81b914;hp=bbf251d7a5ee8fd3dca695b69782bd5c4f67a469;hpb=90270c180381861fbf880dc30a8631ab4c5343a3;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy.pm b/lib/ZOOM/IRSpy.pm index bbf251d..362e8b0 100644 --- a/lib/ZOOM/IRSpy.pm +++ b/lib/ZOOM/IRSpy.pm @@ -1,4 +1,4 @@ -# $Id: IRSpy.pm,v 1.25 2006-10-11 16:44:04 mike Exp $ +# $Id: IRSpy.pm,v 1.28 2006-10-12 15:51:37 mike Exp $ package ZOOM::IRSpy; @@ -7,6 +7,8 @@ use strict; use warnings; use Data::Dumper; # For debugging only +use ZOOM; +use Net::Z3950::ZOOM 1.13; # For the ZOOM version-check only use ZOOM::IRSpy::Node; use ZOOM::IRSpy::Connection; use ZOOM::IRSpy::Record; @@ -331,7 +333,7 @@ sub check { $task->run(); } - ### Test $conn->is_idle() here? + # Do we need to test $conn->is_idle()? I don't think so! } my $i0 = ZOOM::event(\@conn); @@ -365,7 +367,7 @@ sub check { if ($@) { my $sub = $task->{cb}->{exception}; die $@ if !defined $sub; - $res = &$sub($conn, $task, $@); + $res = &$sub($conn, $task, $task->udata(), $@); } else { my $sub = $task->{cb}->{$ev}; if (!defined $sub) { @@ -373,7 +375,7 @@ sub check { next; } - $res = &$sub($conn, $task, $ev); + $res = &$sub($conn, $task, $task->udata(), $ev); } if ($res == ZOOM::IRSpy::Status::OK) { @@ -393,8 +395,11 @@ sub check { $conn->log("irspy", "test completed ($x)"); $conn->current_task(0); $conn->next_task(0); - ### Should also skip over remaining sibling tests if TEST_BAD - $nskipped += 1; # should count number of skipped siblings + if ($res == ZOOM::IRSpy::Status::TEST_BAD) { + ### Should skip over remaining sibling tests if TEST_BAD + ### Should count the number of skipped siblings + $nskipped += 1; + } } }