testbot: Don't try to dereference $TunnelDefaults if it is undefined. (try2)

Francois Gouget fgouget at codeweavers.com
Mon Dec 17 10:09:29 CST 2012


---

Rebased so this patch does not depend on other unsubmitted changes.

 testbot/lib/WineTestBot/VMs.pm |    3 ++-
 testbot/scripts/TestAgent      |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm
index f41453e..ccfa9f2 100644
--- a/testbot/lib/WineTestBot/VMs.pm
+++ b/testbot/lib/WineTestBot/VMs.pm
@@ -369,7 +369,8 @@ sub _GetTunnel($)
   {
     my $ParsedURI = URI->new($URI);
 
-    my %TunnelInfo = %$TunnelDefaults;
+    my %TunnelInfo;
+    %TunnelInfo = %$TunnelDefaults if ($TunnelDefaults);
     $TunnelInfo{sshhost}  = $ParsedURI->host;
     $TunnelInfo{sshport}  = $ParsedURI->port;
     $TunnelInfo{username} = $ParsedURI->userinfo;
diff --git a/testbot/scripts/TestAgent b/testbot/scripts/TestAgent
index f72531c..a4c8e1a 100755
--- a/testbot/scripts/TestAgent
+++ b/testbot/scripts/TestAgent
@@ -244,7 +244,7 @@ my $TunnelInfo;
 if ($TunnelOpt)
 {
     my $ParsedURI = URI->new($TunnelOpt);
-    %$TunnelInfo = %$TunnelDefaults;
+    %$TunnelInfo = %$TunnelDefaults if ($TunnelDefaults);
     $TunnelInfo->{sshhost} = $ParsedURI->host;
     $TunnelInfo->{sshport} = $ParsedURI->port;
     $TunnelInfo->{username} = $ParsedURI->userinfo;
-- 
1.7.10.4



More information about the wine-patches mailing list