diff options
-rw-r--r-- | camel/ChangeLog | 17 | ||||
-rw-r--r-- | camel/camel-filter-search.c | 3 | ||||
-rw-r--r-- | camel/camel-folder-summary.h | 2 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-command.c | 11 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 19 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-summary.h | 2 |
6 files changed, 33 insertions, 21 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 08c4dd9a05..259b5406c2 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,20 @@ +2004-02-25 Not Zed <NotZed@Ximian.com> + + * providers/imap/camel-imap-summary.h (CAMEL_IMAP_MESSAGE_RECENT): + moved the RECNET flag into the folder area (bit 17-30). + +2004-02-24 Not Zed <NotZed@Ximian.com> + + ** See bug #53876. + + * providers/imap/camel-imap-command.c (camel_imap_command): ref + the folder before unreffing store->current_folder, incase they're + the same. Do a select anyway. + + * providers/imap/camel-imap-folder.c (imap_refresh_info): keep the + connect_lock for longer, imap_rescan for one assumes its locked. + Fixes a race selecting the folder for refresh. + 2004-02-24 Jeffrey Stedfast <fejj@ximian.com> * camel-stream-process.c: #include <signal.h>, we don't need limits.h diff --git a/camel/camel-filter-search.c b/camel/camel-filter-search.c index fa3273d895..c2edbe7a95 100644 --- a/camel/camel-filter-search.c +++ b/camel/camel-filter-search.c @@ -614,7 +614,7 @@ junk_test (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessage if (fms->session->junk_plugin != NULL) { retval = camel_junk_plugin_check_junk (fms->session->junk_plugin, camel_filter_search_get_message (fms, f)); - fprintf (stderr, "junk filter => %s\n", retval ? "*JUNK*" : "clean"); + printf("junk filter => %s\n", retval ? "*JUNK*" : "clean"); } r = e_sexp_result_new (f, ESEXP_RES_BOOL); r->value.number = retval; @@ -622,7 +622,6 @@ junk_test (struct _ESExp *f, int argc, struct _ESExpResult **argv, FilterMessage return r; } - /** * camel_filter_search_match: * @session: diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h index 366df70395..78c3c439fa 100644 --- a/camel/camel-folder-summary.h +++ b/camel/camel-folder-summary.h @@ -62,6 +62,8 @@ enum _CamelMessageFlags { CAMEL_MESSAGE_DRAFT = 1<<2, CAMEL_MESSAGE_FLAGGED = 1<<3, CAMEL_MESSAGE_SEEN = 1<<4, + + /* these aren't really system flag bits, but are convenience flags */ CAMEL_MESSAGE_ATTACHMENTS = 1<<5, CAMEL_MESSAGE_ANSWERED_ALL = 1<<6, CAMEL_MESSAGE_JUNK = 1<<7, diff --git a/camel/providers/imap/camel-imap-command.c b/camel/providers/imap/camel-imap-command.c index 45e5751b87..e7cfc051a5 100644 --- a/camel/providers/imap/camel-imap-command.c +++ b/camel/providers/imap/camel-imap-command.c @@ -99,14 +99,11 @@ camel_imap_command (CamelImapStore *store, CamelFolder *folder, cmd = imap_command_strdup_vprintf (store, fmt, ap); va_end (ap); } else { - if (store->current_folder) { - camel_object_unref (CAMEL_OBJECT (store->current_folder)); - store->current_folder = NULL; - } + camel_object_ref(folder); + if (store->current_folder) + camel_object_unref(store->current_folder); store->current_folder = folder; - camel_object_ref (CAMEL_OBJECT (folder)); - cmd = imap_command_strdup_printf (store, "SELECT %F", - folder->full_name); + cmd = imap_command_strdup_printf (store, "SELECT %F", folder->full_name); } if (!imap_command_start (store, folder, cmd, ex)) { diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index 5248a8ef17..838762b304 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -503,23 +503,18 @@ imap_refresh_info (CamelFolder *folder, CamelException *ex) CAMEL_SERVICE_LOCK (imap_store, connect_lock); if (imap_store->current_folder != folder || strcasecmp(folder->full_name, "INBOX") == 0) { - CAMEL_SERVICE_UNLOCK (imap_store, connect_lock); response = camel_imap_command (imap_store, folder, ex, NULL); if (response) { camel_imap_folder_selected (folder, response, ex); camel_imap_response_free (imap_store, response); } - return; - } - CAMEL_SERVICE_UNLOCK (imap_store, connect_lock); - - /* Otherwise, if we need a rescan, do it, and if not, just do - * a NOOP to give the server a chance to tell us about new - * messages. - */ - if (imap_folder->need_rescan) + } else if (imap_folder->need_rescan) { + /* Otherwise, if we need a rescan, do it, and if not, just do + * a NOOP to give the server a chance to tell us about new + * messages. + */ imap_rescan (folder, camel_folder_summary_count (folder->summary), ex); - else { + } else { #if 0 /* on some servers need to CHECKpoint INBOX to recieve new messages?? */ /* rfc2060 suggests this, but havent seen a server that requires it */ @@ -531,6 +526,8 @@ imap_refresh_info (CamelFolder *folder, CamelException *ex) response = camel_imap_command (imap_store, folder, ex, "NOOP"); camel_imap_response_free (imap_store, response); } + + CAMEL_SERVICE_UNLOCK (imap_store, connect_lock); } /* Called with the store's connect_lock locked */ diff --git a/camel/providers/imap/camel-imap-summary.h b/camel/providers/imap/camel-imap-summary.h index fc54d8d0d8..e7402aac84 100644 --- a/camel/providers/imap/camel-imap-summary.h +++ b/camel/providers/imap/camel-imap-summary.h @@ -37,7 +37,7 @@ CAMEL_MESSAGE_FLAGGED | \ CAMEL_MESSAGE_SEEN) -#define CAMEL_IMAP_MESSAGE_RECENT (1 << 8) +#define CAMEL_IMAP_MESSAGE_RECENT (1 << 17) typedef struct _CamelImapSummaryClass CamelImapSummaryClass; |