[Tools 1/2] testbot/TestAgent: Make a couple of Wait() variable names more explicit.

Francois Gouget fgouget at free.fr
Mon Apr 4 05:29:10 CDT 2016


These timeout and deadline are specific to this Wait() operation unlike 
the general TestAgent timeout and deadline fields.

Signed-off-by: Francois Gouget <fgouget at free.fr>
---
 testbot/lib/WineTestBot/TestAgent.pm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index 43481a9..7f1fc24 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -1171,7 +1171,7 @@ sub Run($$$;$$$)
 
 =item C<Wait()>
 
-Waits at most Timeout seconds for the specified remote process to terminate.
+Waits at most WaitTimeout seconds for the specified remote process to terminate.
 The Keepalive specifies how often, in seconds, to check that the remote end
 is still alive and reachable.
 
@@ -1180,21 +1180,21 @@ is still alive and reachable.
 
 sub Wait($$$;$)
 {
-  my ($self, $Pid, $Timeout, $Keepalive) = @_;
-  debug("Wait $Pid, ", defined $Timeout ? $Timeout : "<undef>", ", ",
+  my ($self, $Pid, $WaitTimeout, $Keepalive) = @_;
+  debug("Wait $Pid, ", defined $WaitTimeout ? $WaitTimeout : "<undef>", ", ",
         defined $Keepalive ? $Keepalive : "<undef>", "\n");
 
   my $Result;
   $Keepalive ||= 0xffffffff;
   my $OldTimeout = $self->{timeout};
 
-  my $Deadline = $Timeout ? time() + $Timeout : undef;
+  my $WaitDeadline = $WaitTimeout ? time() + $WaitTimeout : undef;
   while (1)
   {
     my $Remaining = $Keepalive;
-    if ($Deadline)
+    if ($WaitDeadline)
     {
-      $Remaining = $Deadline - time();
+      $Remaining = $WaitDeadline - time();
       last if ($Remaining < 0);
       $Remaining = $Keepalive if ($Keepalive < $Remaining);
     }
-- 
2.8.0.rc3




More information about the wine-patches mailing list