diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-05-27 17:25:47 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-03 04:25:24 +0200 |
commit | b60e74f6ad5328170127d753620c9ead1a087bad (patch) | |
tree | ab46f1dbbb0d435c82588e6f4677975aba61c110 /kioslaves | |
parent | 70ab4a68939ad2185bd423262227e9311c41c81b (diff) | |
download | tdepim-b60e74f6ad5328170127d753620c9ead1a087bad.tar.gz tdepim-b60e74f6ad5328170127d753620c9ead1a087bad.zip |
Fix IMAP hang on auth failure
This closes Bug 1007
Thanks to Francois Andriot for the patch!
(cherry picked from commit aa2af2573ba32542b7f8422c4c0d7f142edd9d95)
Diffstat (limited to 'kioslaves')
-rw-r--r-- | kioslaves/imap4/imapparser.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kioslaves/imap4/imapparser.cc b/kioslaves/imap4/imapparser.cc index 6ba434a4..cb3ac21e 100644 --- a/kioslaves/imap4/imapparser.cc +++ b/kioslaves/imap4/imapparser.cc @@ -277,11 +277,11 @@ imapParser::clientAuthenticate ( KIO::SlaveBase *slave, KIO::AuthInfo &ai, } cmd = sendCommand (new imapCommand ("AUTHENTICATE", firstCommand.latin1())); - while ( true ) + int pl = 0; + while ( pl != -1 && !cmd->isComplete () ) { //read the next line - while (parseLoop() == 0) ; - if ( cmd->isComplete() ) break; + while ((pl = parseLoop()) == 0) ; if (!continuation.isEmpty()) { |