Revision ecf3619...

Go back to digest for 15th December 2013

Features in KDE-PIM

Jan Kundrát committed changes in [trojita] /:

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
Trojita.

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.

REVIEW: 114446

File Changes

Modified 5 files
  •   tests/Imap/test_Imap_SelectedMailboxUpdates.cpp
  •   tests/Imap/test_Imap_Tasks_ObtainSynchronizedMailbox.cpp
  •   tests/Imap/test_Imap_Tasks_ObtainSynchronizedMailbox.h
  •   tests/Utils/LibMailboxSync.cpp
  •   src/Imap/Tasks/ObtainSynchronizedMailboxTask.cpp
5 files changed in total