Chromium Code Reviews| Index: net/ftp/ftp_network_transaction.cc |
| diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc |
| index d012818c2371ab65b443b0458b309de17dab5ffd..148e3af73fbecb4e9b925c6e14cb5a3f8c40e312 100644 |
| --- a/net/ftp/ftp_network_transaction.cc |
| +++ b/net/ftp/ftp_network_transaction.cc |
| @@ -9,6 +9,7 @@ |
| #include "base/string_number_conversions.h" |
| #include "base/string_util.h" |
| #include "base/utf_string_conversions.h" |
| +#include "net/base/address_list.h" |
| #include "net/base/connection_type_histograms.h" |
| #include "net/base/escape.h" |
| #include "net/base/net_errors.h" |
| @@ -620,8 +621,15 @@ int FtpNetworkTransaction::DoCtrlConnect() { |
| } |
| int FtpNetworkTransaction::DoCtrlConnectComplete(int result) { |
| - if (result == OK) |
| - next_state_ = STATE_CTRL_READ; |
| + if (result == OK) { |
| + // Put the peer's ip and port into the response. |
|
eroman
2011/02/18 02:48:30
nit: "ip" --> "IP address"
Brian Ryner
2011/02/18 04:41:59
Done.
|
| + AddressList address; |
| + result = ctrl_socket_->GetPeerAddress(&address); |
| + if (result == OK) { |
| + response_.socket_address = HostPortPair::FromAddrInfo(address.head()); |
| + next_state_ = STATE_CTRL_READ; |
| + } |
| + } |
| return result; |
| } |