aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-02-25 11:47:04 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-02-25 11:47:04 +0800
commit5eebe62b1d62ecac577a4003b85e99897bb90c30 (patch)
tree19e55a3848b160145e1d4e84a3a1b3b0ebfb46e9 /camel/providers
parentdbb8a61852e4ca800be2267525ca241a6a8f5325 (diff)
downloadgsoc2013-evolution-5eebe62b1d62ecac577a4003b85e99897bb90c30.tar.gz
gsoc2013-evolution-5eebe62b1d62ecac577a4003b85e99897bb90c30.tar.zst
gsoc2013-evolution-5eebe62b1d62ecac577a4003b85e99897bb90c30.zip
moved the RECNET flag into the folder area (bit 17-30).
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. svn path=/trunk/; revision=24862
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-command.c11
-rw-r--r--camel/providers/imap/camel-imap-folder.c19
-rw-r--r--camel/providers/imap/camel-imap-summary.h2
3 files changed, 13 insertions, 19 deletions
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;