"not connected" message is now logged at "irspy" level so it appears
[irspy-moved-to-github.git] / lib / ZOOM / IRSpy / Test / Ping.pm
index a85adc5..bc915db 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Ping.pm,v 1.24 2007-05-03 14:43:31 mike Exp $
+# $Id: Ping.pm,v 1.28 2008-07-16 11:51:09 mike Exp $
 
 # See the "Main" test package for documentation
 
@@ -21,7 +21,14 @@ sub start {
     my $class = shift();
     my($conn) = @_;
 
-    $conn->irspy_connect(undef, {},
+    my %options = ();
+    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");
+    $options{"*user"} = $user if $user;
+    $options{"*password"} = $password if $password;
+
+    $conn->irspy_connect(undef, \%options,
                         ZOOM::Event::ZEND, \&connected,
                         exception => \&not_connected);
 }
@@ -82,7 +89,7 @@ sub connected {
 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(),