CamelIMAPXServer: Add a mutex to guard selected/pending folders.
authorMatthew Barnes <mbarnes@redhat.com>
Wed, 27 Feb 2013 20:33:54 +0000 (15:33 -0500)
committerMatthew Barnes <mbarnes@redhat.com>
Wed, 27 Feb 2013 22:34:02 +0000 (17:34 -0500)
Technically an ABI break, but only affects evolution-kolab so we'll skip
the shared object name bump.  Sooner or later all this public crud needs
to be moved to the CamelIMAPXServerPrivate struct.

camel/camel-imapx-server.c
camel/camel-imapx-server.h

index 020f890..3ae652f 100644 (file)
@@ -6940,6 +6940,7 @@ imapx_server_finalize (GObject *object)
        is->done = NULL;
 
        g_rec_mutex_clear (&is->queue_lock);
+       g_mutex_clear (&is->select_lock);
        g_mutex_clear (&is->fetch_mutex);
        g_cond_clear (&is->fetch_cond);
 
@@ -7061,6 +7062,8 @@ camel_imapx_server_init (CamelIMAPXServer *is)
 
        g_rec_mutex_init (&is->queue_lock);
 
+       g_mutex_init (&is->select_lock);
+
        is->state = IMAPX_DISCONNECTED;
 
        is->expunged = NULL;
index fbabbbb..f506d48 100644 (file)
@@ -132,9 +132,10 @@ struct _CamelIMAPXServer {
        CamelIMAPXCommandQueue *done;
 
        /* info on currently selected folder */
+       GMutex select_lock;
        CamelFolder *select_folder;
-       CamelFolderChangeInfo *changes;
        CamelFolder *select_pending;
+       CamelFolderChangeInfo *changes;
        guint32 permanentflags;
        guint32 unseen;
        guint64 uidvalidity;