[Commits] advsearch.c 1.1.2.4 1.1.2.5 imap.c 1.179.2.265 1.179.2.266
colin at claws-mail.org
colin at claws-mail.org
Fri Sep 28 17:33:08 CEST 2012
Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv11966/src
Modified Files:
Tag: gtk2
advsearch.c imap.c
Log Message:
2012-09-28 [colin] 3.8.1cvs81
* src/advsearch.c
Never search on server if we're offline
(Asking the user would and will be better)
* src/imap.c
Fix uninitialized variable (bogus) warning
Fix SELECT of the folder before searching
Index: advsearch.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/advsearch.c,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -d -r1.1.2.4 -r1.1.2.5
--- advsearch.c 27 Sep 2012 14:48:45 -0000 1.1.2.4
+++ advsearch.c 28 Sep 2012 15:33:05 -0000 1.1.2.5
@@ -30,6 +30,7 @@
#include "matcher.h"
#include "matcher_parser.h"
#include "utils.h"
+#include "prefs_common.h"
struct _AdvancedSearch {
struct {
@@ -487,9 +488,12 @@
MsgNumberList *msgnums = NULL;
MsgNumberList *cur;
MsgInfoList *msgs = NULL;
+ gboolean can_search_on_server =
+ folderItem->folder->klass->supports_server_search
+ && !prefs_common.work_offline;
if (!search_filter_folder(&msgnums, search, folderItem,
- folderItem->folder->klass->supports_server_search)) {
+ can_search_on_server)) {
g_slist_free(msgnums);
return FALSE;
}
Index: imap.c
===================================================================
RCS file: /home/claws-mail/claws/src/imap.c,v
retrieving revision 1.179.2.265
retrieving revision 1.179.2.266
diff -u -d -r1.179.2.265 -r1.179.2.266
--- imap.c 27 Sep 2012 14:48:45 -0000 1.179.2.265
+++ imap.c 28 Sep 2012 15:33:05 -0000 1.179.2.266
@@ -2167,7 +2167,8 @@
GSList* cur;
int result = -1;
clist* uidlist = NULL;
- gboolean server_filtering_useless;
+ gboolean server_filtering_useless = FALSE;
+ IMAPSession *session;
if (on_server == NULL || !*on_server) {
return folder_item_search_msgs_local(folder, container, msgs, on_server,
@@ -2221,6 +2222,15 @@
return count;
}
+ session = imap_session_get(folder);
+ if (!session) {
+ return -1;
+ }
+ result = imap_select(session, IMAP_FOLDER(folder), FOLDER_ITEM(container),
+ NULL, NULL, NULL, NULL, NULL, TRUE);
+ if (result != MAILIMAP_NO_ERROR)
+ return -1;
+
if (progress_cb)
progress_cb(progress_data, TRUE, 0, 0, container->total_msgs);
result = imap_threaded_search(folder, IMAP_SEARCH_TYPE_KEYED, key, NULL, &uidlist);
More information about the Commits
mailing list