FTP: EPSV and EPRT commands are used for IPv6 only.

git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@130 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
geby 2011-01-19 14:23:50 +00:00
parent 492b48fa05
commit b02a43c5c1

View File

@ -1,9 +1,9 @@
{==============================================================================| {==============================================================================|
| Project : Ararat Synapse | 003.005.003 | | Project : Ararat Synapse | 003.005.004 |
|==============================================================================| |==============================================================================|
| Content: FTP client | | Content: FTP client |
|==============================================================================| |==============================================================================|
| Copyright (c)1999-2010, Lukas Gebauer | | Copyright (c)1999-2011, Lukas Gebauer |
| All rights reserved. | | All rights reserved. |
| | | |
| Redistribution and use in source and binary forms, with or without | | Redistribution and use in source and binary forms, with or without |
@ -852,7 +852,7 @@ begin
s := '2' s := '2'
else else
s := '1'; s := '1';
if not(FForceOldPort) and ((FTPCommand('EPSV ' + s) div 100) = 2) then if FSock.IP6used and not(FForceOldPort) and ((FTPCommand('EPSV ' + s) div 100) = 2) then
begin begin
ParseRemoteEPSV(FResultString); ParseRemoteEPSV(FResultString);
end end
@ -887,7 +887,7 @@ begin
FDataIP := FDSock.GetLocalSinIP; FDataIP := FDSock.GetLocalSinIP;
FDataIP := FDSock.ResolveName(FDataIP); FDataIP := FDSock.ResolveName(FDataIP);
FDataPort := IntToStr(FDSock.GetLocalSinPort); FDataPort := IntToStr(FDSock.GetLocalSinPort);
if not FForceOldPort then if FSock.IP6used and (not FForceOldPort) then
begin begin
if IsIp6(FDataIP) then if IsIp6(FDataIP) then
s := '2' s := '2'