summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kioslaves/imap4/imapparser.cc6
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())
{