From 8981e1a0eee6d151235e3581612df9282dfe8ac6 Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Fri, 4 May 2007 12:09:58 +0000 Subject: [PATCH] Code to send username/password. I am pretty sure this correct, but it can't be demonstrated so due to a bug in ZOOM-C. --- lib/ZOOM/IRSpy/Test/Ping.pm | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/ZOOM/IRSpy/Test/Ping.pm b/lib/ZOOM/IRSpy/Test/Ping.pm index a85adc5..12c3455 100644 --- a/lib/ZOOM/IRSpy/Test/Ping.pm +++ b/lib/ZOOM/IRSpy/Test/Ping.pm @@ -1,4 +1,4 @@ -# $Id: Ping.pm,v 1.24 2007-05-03 14:43:31 mike Exp $ +# $Id: Ping.pm,v 1.25 2007-05-04 12:09:58 mike Exp $ # See the "Main" test package for documentation @@ -21,7 +21,15 @@ 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"); + warn "user='$user', password='$password'\n"; + $options{user} = $user if $user; + $options{password} = $password if $password; + + $conn->irspy_connect(undef, \%options, ZOOM::Event::ZEND, \&connected, exception => \¬_connected); } -- 1.7.10.4