[Commits] [SCM] claws branch, master, updated. 3.17.4-76-gf731f3972

miras at claws-mail.org miras at claws-mail.org
Fri Dec 6 16:26:46 CET 2019


The branch, master has been updated
       via  f731f3972096c8d1d793469188e7126d1d3c9924 (commit)
      from  d2a8e92380b80937b5b52b70696dacc47c929558 (commit)

Summary of changes:
 src/imap.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit f731f3972096c8d1d793469188e7126d1d3c9924
Author: Michael Rasmussen <mir at datanom.net>
Date:   Fri Dec 6 00:50:48 2019 +0100

    Fix imap keyword search. Libetpan assumes keyword search is a MUST but RFC states it is a MAY. Fix advanced search on MS Exchange
    
    Signed-off-by: Michael Rasmussen <mir at datanom.net>

diff --git a/src/imap.c b/src/imap.c
index 8d8876b72..8521e355e 100644
--- a/src/imap.c
+++ b/src/imap.c
@@ -2496,10 +2496,16 @@ static gint	search_msgs		(Folder			*folder,
 		progress_cb(progress_data, TRUE, container->total_msgs, 0, container->total_msgs);
 
 	if (result == MAILIMAP_ERROR_PROTOCOL) {
-		debug_print("search_msgs - got protocol error, aborting\n");
+		debug_print("Server side search unavailable, using local search\n");
 		imap_handle_error(SESSION(session), NULL, result);
-		alertpanel_error_log(_("Search failed due to server error."));
-		return -1;
+		result = folder_item_search_msgs_local(folder, container, msgs,				    NULL, predicate, progress_cb, progress_data);
+		if (result < 0) {
+			debug_print("search_msgs - got protocol error, aborting\n");
+			alertpanel_error_log(_("Search failed due to server error."));
+			return -1;
+		}
+
+		return result;
 	} if (result == MAILIMAP_NO_ERROR) {
 		gint result = 0;
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list