mirror of
https://github.com/curl/curl.git
synced 2026-08-26 10:53:36 +03:00
improved functionality for new timeout tests
This commit is contained in:
parent
f34573c8e2
commit
3bfa06c9a2
3 changed files with 38 additions and 0 deletions
|
|
@ -326,6 +326,7 @@ sub PORT_command {
|
|||
$SIG{CHLD} = \&REAPER;
|
||||
|
||||
my %customreply;
|
||||
my %delayreply;
|
||||
sub customize {
|
||||
undef %customreply;
|
||||
open(CUSTOM, "<log/ftpserver.cmd") ||
|
||||
|
|
@ -337,6 +338,9 @@ sub customize {
|
|||
if($_ =~ /REPLY ([A-Z]+) (.*)/) {
|
||||
$customreply{$1}=$2;
|
||||
}
|
||||
elsif($_ =~ /DELAY ([A-Z]+) (\d*)/) {
|
||||
$delayreply{$1}=$2;
|
||||
}
|
||||
}
|
||||
close(CUSTOM);
|
||||
}
|
||||
|
|
@ -416,6 +420,12 @@ for ( $waitedpid = 0;
|
|||
$state = $newstate;
|
||||
}
|
||||
|
||||
my $delay = $delayreply{$FTPCMD};
|
||||
if($delay) {
|
||||
# just go sleep this many seconds!
|
||||
sleep($delay);
|
||||
}
|
||||
|
||||
my $text;
|
||||
$text = $customreply{$FTPCMD};
|
||||
my $fake = $text;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue