[Commits] [SCM] claws branch, master, updated. 3.16.0-90-g2d03eb9
ticho at claws-mail.org
ticho at claws-mail.org
Thu Mar 15 20:34:28 CET 2018
The branch, master has been updated
via 2d03eb98268e11b12c698bb6f98c7fb2f3559e3b (commit)
from cc975240516c86bb3221443a1a91c3752706ad3c (commit)
Summary of changes:
src/imap.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit 2d03eb98268e11b12c698bb6f98c7fb2f3559e3b
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Wed Mar 14 21:35:05 2018 +0100
Handle IMAP search failure instead of ignoring it.
Error out on protocol error during search, disconnect
the IMAP session, and display an error dialog about it.
Closes bug 3986 - IMAP quick search using non-ASCII
characters creates an infinite loop
diff --git a/src/imap.c b/src/imap.c
index 5c99688..8d0ded9 100644
--- a/src/imap.c
+++ b/src/imap.c
@@ -2468,7 +2468,12 @@ static gint search_msgs (Folder *folder,
if (progress_cb)
progress_cb(progress_data, TRUE, container->total_msgs, 0, container->total_msgs);
- if (result == MAILIMAP_NO_ERROR) {
+ if (result == MAILIMAP_ERROR_PROTOCOL) {
+ debug_print("search_msgs - got protocol error, aborting\n");
+ imap_handle_error(SESSION(session), NULL, result);
+ alertpanel_error_log(_("Search failed due to server error."));
+ return -1;
+ } if (result == MAILIMAP_NO_ERROR) {
gint result = 0;
*msgs = imap_uid_list_from_lep(uidlist, &result);
@@ -2489,9 +2494,12 @@ static gint search_msgs (Folder *folder,
if (IMAP_FOLDER(folder)->search_charset_supported)
return search_msgs(folder, container, msgs, on_server, predicate,
progress_cb, progress_data);
- else
+ else {
+ imap_handle_error(SESSION(session), NULL, result);
return -1;
+ }
} else {
+ imap_handle_error(SESSION(session), NULL, result);
return -1;
}
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list