diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-05-27 17:25:47 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-05-27 17:25:47 -0500 |
commit | aa2af2573ba32542b7f8422c4c0d7f142edd9d95 (patch) | |
tree | 825a502dfe1d31f7525e3a65ec6b11f9cae9dbfa /kioslaves/imap4 | |
parent | cfa7cb5d34a6ed30791686c7dabc1c4eab15b30d (diff) | |
download | tdepim-aa2af2573ba32542b7f8422c4c0d7f142edd9d95.tar.gz tdepim-aa2af2573ba32542b7f8422c4c0d7f142edd9d95.zip |
Fix IMAP hang on auth failure
This closes Bug 1007
Thanks to Francois Andriot for the patch!
Diffstat (limited to 'kioslaves/imap4')
-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 791e78fa6..f916d8294 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()) { |