X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=lib%2FZOOM%2FIRSpy%2FTest%2FPing.pm;h=3b88e34ae50de83c8e4f3e208451112298af6f90;hb=c3814e75a795a951ec1c89f9214709f8db9d233d;hp=1cda0cd2783a3820fc0befb7498d1181ad1a1335;hpb=880bb74a2cc77e58aa99cbaeb300435316417e76;p=irspy-moved-to-github.git diff --git a/lib/ZOOM/IRSpy/Test/Ping.pm b/lib/ZOOM/IRSpy/Test/Ping.pm index 1cda0cd..3b88e34 100644 --- a/lib/ZOOM/IRSpy/Test/Ping.pm +++ b/lib/ZOOM/IRSpy/Test/Ping.pm @@ -1,4 +1,4 @@ -# $Id: Ping.pm,v 1.12 2006-10-06 11:33:08 mike Exp $ +# $Id: Ping.pm,v 1.16 2006-11-29 18:18:37 mike Exp $ # See the "Main" test package for documentation @@ -11,13 +11,16 @@ use warnings; use ZOOM::IRSpy::Test; our @ISA = qw(ZOOM::IRSpy::Test); +use ZOOM::IRSpy::Utils qw(isodate); + sub start { my $class = shift(); my($conn) = @_; - $conn->irspy_connect(ZOOM::Event::CONNECT, \&connected, - "exception", \¬_connected); + $conn->irspy_connect(undef, {}, + ZOOM::Event::CONNECT, \&connected, + exception => \¬_connected); } @@ -25,14 +28,14 @@ sub connected { maybe_connected(@_, 1) } sub not_connected { maybe_connected(@_, 0) } sub maybe_connected { - my($conn, $rs, $event, $ok) = @_; + my($conn, $task, $__UNUSED_udata, $event, $ok) = @_; $conn->log("irspy_test", ($ok ? "" : "not "), "connected"); my $rec = $conn->record(); $rec->append_entry("irspy:status", "" . isodate(time()) . ""); - $conn->option(pod_omit => 1) if !$ok; - return ZOOM::IRSpy::Status::TASK_DONE; + return $ok ? ZOOM::IRSpy::Status::TEST_GOOD : + ZOOM::IRSpy::Status::TEST_BAD; }