ftpserver.pl: Introduced common method for getting a test's reply data
This commit is contained in:
@@ -436,6 +436,25 @@ sub startsf {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#**********************************************************************
|
||||||
|
# Returns the given test's reply data
|
||||||
|
#
|
||||||
|
sub getreplydata {
|
||||||
|
my ($testno) = @_;
|
||||||
|
my $testpart = "";
|
||||||
|
|
||||||
|
$testno =~ s/^([^0-9]*)//
|
||||||
|
if($testno > 10000) {
|
||||||
|
$testpart = $testno % 10000;
|
||||||
|
$testno = int($testno / 10000);
|
||||||
|
}
|
||||||
|
|
||||||
|
loadtest("$srcdir/data/test$testno");
|
||||||
|
|
||||||
|
my @data = getpart("reply", "data$testpart");
|
||||||
|
|
||||||
|
return @data;
|
||||||
|
}
|
||||||
|
|
||||||
sub sockfilt {
|
sub sockfilt {
|
||||||
my $l;
|
my $l;
|
||||||
@@ -445,7 +464,6 @@ sub sockfilt {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sub sockfiltsecondary {
|
sub sockfiltsecondary {
|
||||||
my $l;
|
my $l;
|
||||||
foreach $l (@_) {
|
foreach $l (@_) {
|
||||||
@@ -454,10 +472,10 @@ sub sockfiltsecondary {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#**********************************************************************
|
||||||
# Send data to the client on the control stream, which happens to be plain
|
# Send data to the client on the control stream, which happens to be plain
|
||||||
# stdout.
|
# stdout.
|
||||||
|
#
|
||||||
sub sendcontrol {
|
sub sendcontrol {
|
||||||
if(!$ctrldelay) {
|
if(!$ctrldelay) {
|
||||||
# spit it all out at once
|
# spit it all out at once
|
||||||
|
Reference in New Issue
Block a user