-# $Id: Ping.pm,v 1.25 2007-05-04 12:09:58 mike Exp $
# See the "Main" test package for documentation
use ZOOM::IRSpy::Utils qw(isodate);
use Text::Iconv;
-my $conv = new Text::Iconv("LATIN1", "UTF8");
+my $conv = new Text::Iconv("LATIN1", "UTF-8");
sub start {
my $xc = $conn->record()->xpath_context();
my $user = $xc->find("e:serverInfo/e:authentication/e:user");
my $password = $xc->find("e:serverInfo/e:authentication/e:password");
- warn "user='$user', password='$password'\n";
- $options{user} = $user if $user;
- $options{password} = $password if $password;
+ $options{"*user"} = $user if $user;
+ $options{"*password"} = $password if $password;
$conn->irspy_connect(undef, \%options,
ZOOM::Event::ZEND, \&connected,
if $conn->option("init_opt_$opt");
}
- foreach my $opt (qw(serverImplementationId
- serverImplementationName
- serverImplementationVersion)) {
+ my %params = (serverImplementationId => "id",
+ serverImplementationName => "name",
+ serverImplementationVersion => "version",
+ );
+ foreach my $opt (keys %params) {
my $val = $conn->option($opt);
next if !defined $val; # not defined for SRU, for example
$val = $maybe;
}
$conn->record()->store_result($opt, value => $val);
+ $conn->irspy()->var($params{$opt}, $val);
}
return ZOOM::IRSpy::Status::TEST_GOOD;
sub not_connected {
my($conn, $__UNUSED_task, $__UNUSED_udata, $exception) = @_;
- $conn->log("irspy_test", "not connected: $exception");
+ $conn->log("irspy", "not connected: $exception");
$conn->record()->store_result("probe",
ok => 0,
errcode => $exception->code(),