Features in KDE-PIM
IMAP: Handle tagged responses even if they contain a response code
The ObtainSynchronizedMailboxTask contained a bug which caused it to skip
processing of the tagged responses when they contained a recognized response
code. This is a real problem when the server sends us something like that in
response to e.g. ESEARCH -- the synchronization process gets effectively stuck
waiting for the UID discovery to finish, which is not going to happen, because
the tagged OK was ignored.
Thanks to Tetja Rediske (Kelsar on IRC) for reporting this and
persuading me that this is not a random fluke on his computer, but a bug in
The KeepMailboxOpenTask does not suffer from this bug because its
handleResponseCodeInsideState() already checked for tag being empty prior to
returning true for "already handled, we're done here" case. It makes sense for
Obtain... and Keep...'s code to be designed the same way, so this patch changes
the ObtainSynchronizedMailboxTask::handleResponseCodeInsideState to use the
checks in the same manner as KeepMailboxOpenTask did already. The other tasks
do not seem to suffer from this problem.
The tests were amended to check for both of these.