diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-24 21:34:10 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-24 21:34:10 +0000 |
commit | 5c9cdc459e39c935701616c236bb7ad5061c41ee (patch) | |
tree | cbf11e76a57d65316722f266f4f7b0e1bf4fc513 /net/ftp/ftp_network_transaction.cc | |
parent | 914f139f4c725fb3c0c4d4a54174928ab7943ce1 (diff) | |
download | chromium_src-5c9cdc459e39c935701616c236bb7ad5061c41ee.zip chromium_src-5c9cdc459e39c935701616c236bb7ad5061c41ee.tar.gz chromium_src-5c9cdc459e39c935701616c236bb7ad5061c41ee.tar.bz2 |
Prevent infinite loop in new FtpNetworkTransaction.
It tried to send a QUIT command when sending QUIT command failed.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/146103
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19177 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/ftp/ftp_network_transaction.cc')
-rw-r--r-- | net/ftp/ftp_network_transaction.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ftp/ftp_network_transaction.cc b/net/ftp/ftp_network_transaction.cc index 87c3e16..6d2381d 100644 --- a/net/ftp/ftp_network_transaction.cc +++ b/net/ftp/ftp_network_transaction.cc @@ -63,9 +63,12 @@ int FtpNetworkTransaction::Start(const FtpRequestInfo* request_info, } int FtpNetworkTransaction::Stop(int error) { + if (command_sent_ == COMMAND_QUIT) + return ERR_FAILED; + next_state_ = STATE_CTRL_WRITE_QUIT; last_error_ = error; - return OK; + return error; } int FtpNetworkTransaction::RestartWithAuth(const std::wstring& username, |