1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-12 04:25:08 -05:00

Revert change committed on Mon May 4 09:30:23 2009 UTC.

The origin of the problem with test case #251 was the --ftp-port not being the CLIENTIP address.
This commit is contained in:
Yang Tse 2009-05-05 08:46:31 +00:00
parent b40b989523
commit a840cc700a
2 changed files with 20 additions and 30 deletions

View File

@ -83,7 +83,6 @@ my $ext; # append to log/pid file names
my $grok_eprt; my $grok_eprt;
my $port = 8921; # just a default my $port = 8921; # just a default
my $listenaddr = "127.0.0.1"; # just a default my $listenaddr = "127.0.0.1"; # just a default
my $client;
my $pidfile = ".ftpd.pid"; # a default, use --pidfile my $pidfile = ".ftpd.pid"; # a default, use --pidfile
my $SERVERLOGS_LOCK="log/serverlogs.lock"; # server logs advisor read lock my $SERVERLOGS_LOCK="log/serverlogs.lock"; # server logs advisor read lock
@ -118,11 +117,6 @@ do {
$listenaddr =~ s/^\[(.*)\]$/\1/; $listenaddr =~ s/^\[(.*)\]$/\1/;
shift @ARGV; shift @ARGV;
} }
elsif($ARGV[0] eq "--client") {
$client = $ARGV[1];
$client =~ s/^\[(.*)\]$/\1/;
shift @ARGV;
}
} while(shift @ARGV); } while(shift @ARGV);
sub catch_zap { sub catch_zap {
@ -711,7 +705,7 @@ sub PORT_command {
# We fire up a new sockfilt to do the data transfer for us. # We fire up a new sockfilt to do the data transfer for us.
# FIX: make it use IPv6 if need be # FIX: make it use IPv6 if need be
my $filtcmd="./server/sockfilt --connect $port --addr $client --logfile log/sockdata$ftpdnum$ext.log --pidfile .sockdata$ftpdnum$ext.pid $ipv6"; my $filtcmd="./server/sockfilt --connect $port --addr $addr --logfile log/sockdata$ftpdnum$ext.log --pidfile .sockdata$ftpdnum$ext.pid $ipv6";
$slavepid = open2(\*DREAD, \*DWRITE, $filtcmd); $slavepid = open2(\*DREAD, \*DWRITE, $filtcmd);
print STDERR "$filtcmd\n" if($verbose); print STDERR "$filtcmd\n" if($verbose);

View File

@ -943,8 +943,6 @@ sub runftpserver {
my $ip=$HOSTIP; my $ip=$HOSTIP;
my $nameext; my $nameext;
my $cmd; my $cmd;
my $addr;
my $addr_client;
if($ipv6) { if($ipv6) {
# if IPv6, use a different setup # if IPv6, use a different setup
@ -968,20 +966,18 @@ sub runftpserver {
# start our server: # start our server:
my $flag=$debugprotocol?"-v ":""; my $flag=$debugprotocol?"-v ":"";
$flag .= "-s \"$srcdir\" "; $flag .= "-s \"$srcdir\" ";
my $addr;
if($id) { if($id) {
$flag .="--id $id "; $flag .="--id $id ";
} }
if($ipv6) { if($ipv6) {
$flag .="--ipv6 "; $flag .="--ipv6 ";
$addr = $HOST6IP; $addr = $HOST6IP;
$addr_client = $CLIENT6IP;
} else { } else {
$addr = $HOSTIP; $addr = $HOSTIP;
$addr_client = $CLIENTIP;
} }
$cmd="$perl $srcdir/ftpserver.pl --pidfile $pidfile $flag --port $port --addr \"$addr\" --client \"$addr_client\""; $cmd="$perl $srcdir/ftpserver.pl --pidfile $pidfile $flag --port $port --addr \"$addr\"";
my ($ftppid, $pid2) = startnew($cmd, $pidfile, 15, 0); my ($ftppid, $pid2) = startnew($cmd, $pidfile, 15, 0);
if($ftppid <= 0 || !kill(0, $ftppid)) { if($ftppid <= 0 || !kill(0, $ftppid)) {