Module: tools
Branch: master
Commit: f6535406115e2e158b032acd7e8fde55c1264f1a
URL: http://source.winehq.org/git/tools.git/?a=commit;h=f6535406115e2e158b032acd…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Mar 26 13:14:41 2013 +0100
testbot/TestAgent: Optimize GetVersion().
To get the server version we just need to connect, we don't need to send a full RPC.
---
testbot/lib/WineTestBot/TestAgent.pm | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index 4aaaea0..f542991 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -987,8 +987,8 @@ sub GetVersion($)
if (!$self->{agentversion})
{
- # Force a connection
- $self->Ping();
+ # Retrieve the server version
+ $self->_Connect();
}
# And return the version we got.
# If the connection failed it will be undef as expected.
Module: tools
Branch: master
Commit: 6032b11f0b005fcd489445ff0f66ef7b4e67ca3f
URL: http://source.winehq.org/git/tools.git/?a=commit;h=6032b11f0b005fcd489445ff…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Mar 26 13:14:12 2013 +0100
testbot/TestAgent: Fix Wait() to not depend on other RPCs to retrieve the server version.
---
testbot/lib/WineTestBot/TestAgent.pm | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index bce1a78..4aaaea0 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -1107,6 +1107,9 @@ sub Wait($$$)
# Add 1 second for the reply to come back
my $OldTimeout = $self->SetTimeout($Timeout + 1) if ($Timeout);
+ # Make sure we have the server version
+ return undef if (!$self->{agentversion} and !$self->_Connect());
+
# Send the command
if ($self->{agentversion} =~ / 1\.0$/)
{