- return folder_item_search_msgs_local(folder, container, msgs, NULL,
- predicate, progress_cb, progress_data);
- }
-
- if (result == MAILIMAP_NO_ERROR) {
+ 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) {