[evolution-patches] 314833, crash (un)subscribing imap folders
- From: Not Zed <notzed ximian com>
- To: evolution-patches <evolution-patches gnome org>
- Subject: [evolution-patches] 314833, crash (un)subscribing imap folders
- Date: Wed, 31 Aug 2005 09:34:58 +0800
should clean up/complete the connection logic re-arrangement.
--
adfa(evolution-2.4:20087): gtkhtml-WARNING **: cannot find icon:
'stock_insert-url' in gnome
Index: camel/providers/imap/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap/ChangeLog,v
retrieving revision 1.32
diff -u -p -r1.32 ChangeLog
--- camel/providers/imap/ChangeLog 24 Aug 2005 08:44:01 -0000 1.32
+++ camel/providers/imap/ChangeLog 31 Aug 2005 01:37:04 -0000
@@ -1,3 +1,11 @@
+2005-08-31 Not Zed <NotZed Ximian com>
+
+ ** See #314833.
+
+ * camel-imap-store.c (subscribe_folder, unsubscribe_folder): add
+ missing locking.
+ (imap_noop): re-arrange locking slightly.
+
2005-08-23 Shreyas Srinivasan <sshreyas novell com>
** See #314199
Index: camel/providers/imap/camel-imap-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/imap/camel-imap-store.c,v
retrieving revision 1.329
diff -u -p -r1.329 camel-imap-store.c
--- camel/providers/imap/camel-imap-store.c 22 Aug 2005 02:51:45 -0000 1.329
+++ camel/providers/imap/camel-imap-store.c 31 Aug 2005 01:37:04 -0000
@@ -1619,19 +1619,13 @@ static void
imap_noop (CamelStore *store, CamelException *ex)
{
CamelImapStore *imap_store = (CamelImapStore *) store;
- CamelDiscoStore *disco = (CamelDiscoStore *) store;
CamelImapResponse *response;
CamelFolder *current_folder;
- if (camel_disco_store_status (disco) != CAMEL_DISCO_STORE_ONLINE)
- return;
-
CAMEL_SERVICE_LOCK (imap_store, connect_lock);
- if (!camel_imap_store_connected(imap_store, ex)) {
- CAMEL_SERVICE_UNLOCK(imap_store, connect_lock);
- return;
- }
+ if (!camel_imap_store_connected(imap_store, ex))
+ goto done;
current_folder = imap_store->current_folder;
if (current_folder && imap_summary_is_dirty (current_folder->summary)) {
@@ -1642,7 +1636,7 @@ imap_noop (CamelStore *store, CamelExcep
if (response)
camel_imap_response_free (imap_store, response);
}
-
+done:
CAMEL_SERVICE_UNLOCK (imap_store, connect_lock);
}
@@ -2845,15 +2839,15 @@ subscribe_folder (CamelStore *store, con
CamelFolderInfo *fi;
CamelStoreInfo *si;
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return;
+ CAMEL_SERVICE_LOCK(store, connect_lock);
+
if (!camel_imap_store_connected (imap_store, ex))
- return;
+ goto done;
response = camel_imap_command (imap_store, NULL, ex,
"SUBSCRIBE %F", folder_name);
if (!response)
- return;
+ goto done;
camel_imap_response_free (imap_store, response);
si = camel_store_summary_path((CamelStoreSummary *)imap_store->summary, folder_name);
@@ -2870,7 +2864,7 @@ subscribe_folder (CamelStore *store, con
/* we don't need to emit a "folder_subscribed" signal
if we are in the process of renaming folders, so we
are done here... */
- return;
+ goto done;
}
fi = imap_build_folder_info(imap_store, folder_name);
@@ -2878,6 +2872,8 @@ subscribe_folder (CamelStore *store, con
camel_object_trigger_event (CAMEL_OBJECT (store), "folder_subscribed", fi);
camel_folder_info_free (fi);
+done:
+ CAMEL_SERVICE_UNLOCK(store, connect_lock);
}
static void
@@ -2886,19 +2882,21 @@ unsubscribe_folder (CamelStore *store, c
{
CamelImapStore *imap_store = CAMEL_IMAP_STORE (store);
CamelImapResponse *response;
+
+ CAMEL_SERVICE_LOCK(store, connect_lock);
- if (!camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex))
- return;
if (!camel_imap_store_connected (imap_store, ex))
- return;
+ goto done;
response = camel_imap_command (imap_store, NULL, ex,
"UNSUBSCRIBE %F", folder_name);
if (!response)
- return;
+ goto done;
camel_imap_response_free (imap_store, response);
imap_folder_effectively_unsubscribed (imap_store, folder_name, ex);
+done:
+ CAMEL_SERVICE_UNLOCK(store, connect_lock);
}
#if 0
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]