-# $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
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);
}
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", "<irspy:probe ok='$ok'>" .
isodate(time()) . "</irspy:probe>");
- $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;
}