-rw-r--r-- | noncore/unsupported/mail2/libmail/imaphandler.cpp | 9 | ||||
-rw-r--r-- | noncore/unsupported/mail2/libmail/imaphandler.h | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/noncore/unsupported/mail2/libmail/imaphandler.cpp b/noncore/unsupported/mail2/libmail/imaphandler.cpp index 66c92c5..730a004 100644 --- a/noncore/unsupported/mail2/libmail/imaphandler.cpp +++ b/noncore/unsupported/mail2/libmail/imaphandler.cpp @@ -6,4 +6,5 @@ IMAPHandler::IMAPHandler(const Account &account) : QObject(), _account(account) { + _ready = false; _loggingin = false; _loggedin = false; @@ -290,4 +291,12 @@ QString IMAPHandler::tag(bool count) void IMAPHandler::slotDataReceived(const QString &data) { + if (!_ready) { + // The first data is always the greeting string. + // We can ignore it. + _ready = true; + return; + } + + IMAPResponseParser parser(data); IMAPResponse response = parser.response(); diff --git a/noncore/unsupported/mail2/libmail/imaphandler.h b/noncore/unsupported/mail2/libmail/imaphandler.h index 8cb42db..cc47a85 100644 --- a/noncore/unsupported/mail2/libmail/imaphandler.h +++ b/noncore/unsupported/mail2/libmail/imaphandler.h @@ -80,5 +80,5 @@ private: IMAPBase *_ibase; unsigned int _tag; - bool _loggingin, _loggedin; + bool _ready, _loggingin, _loggedin; }; |