diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-01-20 00:30:01 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-01-20 00:30:01 +0900 |
| commit | 1ea01e84b22b0a5a8a3553e131ca0cd03203b8bc (patch) | |
| tree | 91363ea19cae2e15302bb83211ea4d70082d2cf6 /src/FtpNegotiationCommand.cc | |
| parent | 1d71626bea62f10e723609e32dce46fb86179749 (diff) | |
Use IP address of data connection to connect to the remote server in
passive mode.
Diffstat (limited to 'src/FtpNegotiationCommand.cc')
| -rw-r--r-- | src/FtpNegotiationCommand.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/FtpNegotiationCommand.cc b/src/FtpNegotiationCommand.cc index 2a99f0ac..96c09476 100644 --- a/src/FtpNegotiationCommand.cc +++ b/src/FtpNegotiationCommand.cc @@ -636,8 +636,10 @@ bool FtpNegotiationCommand::recvPasv() { throw DL_ABORT_EX2(fmt(EX_BAD_STATUS, status), error_code::FTP_PROTOCOL_ERROR); } - dataConnAddr_ = dest; - + std::pair<std::string, uint16_t> peerInfo; + getSocket()->getPeerInfo(peerInfo); + peerInfo.second = dest.second;; + dataConnAddr_ = peerInfo; return preparePasvConnect(); } |
