[2/5] testbot/TestAgent: _SetError() may be called when connecting, that is outside any RPC.

Francois Gouget fgouget at codeweavers.com
Wed Mar 12 08:25:29 CDT 2014


---

This should fix the following error reporting code error message (from 
job 5610):

Use of uninitialized value in hash element at 
/home/testbot/lib/WineTestBot/TestAgent.pm line 215, <DATA> line 558.

This happens when failing to retrieve agent_version during the initial 
connection (which denotes a flaky network connection).

 testbot/lib/WineTestBot/TestAgent.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index f313984..c138663 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -212,7 +212,8 @@ sub _SetError($$$)
     # We did not even manage to connect but record the error anyway
     $self->{err} = $Msg;
   }
-  debug($RpcNames{$self->{rpcid}} || $self->{rpcid}, ": $self->{err}\n");
+  my $RpcName = defined $self->{rpcid} ? $RpcNames{$self->{rpcid}} || $self->{rpcid} : "Connect";
+  debug("$RpcName: $self->{err}\n");
 }
 
 sub GetLastError($)
-- 
1.8.5.3




More information about the wine-patches mailing list