diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-04-15 20:29:13 +0000 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-04-15 20:29:13 +0000 |
commit | ae234294a00ea978f85daedc26bb0db034bf7aa4 (patch) | |
tree | 9107c265096570714d220ba8f75b20bc457f07d5 | |
parent | f401293d9a446ca34f087e3a5bcccc45c8575cf5 (diff) | |
download | evolution-data-server-ae234294a00ea978f85daedc26bb0db034bf7aa4.tar.gz |
Make the folder_lock recursive. See bug #22363 for details. Basically,
2002-04-09 Jeffrey Stedfast <fejj@ximian.com>
* camel-store.c (camel_store_init): Make the folder_lock
recursive. See bug #22363 for details. Basically,
get_folder_info() is requesting a diary folder which in turn
connects which then calls get_folder() but deadlocks because
get_folder_info already holds the lock.
* camel-mime-message.c (camel_mime_message_set_date): Don't adjust
the timezone offset if we used tm.tm_gmtoff because it is already
adjusted.
-rw-r--r-- | camel/ChangeLog | 12 | ||||
-rw-r--r-- | camel/camel-mime-message.c | 3 | ||||
-rw-r--r-- | camel/camel-private.h | 8 | ||||
-rw-r--r-- | camel/camel-store.c | 8 |
4 files changed, 23 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 7aafaaef1..5955d3f0d 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,5 +1,17 @@ 2002-04-09 Jeffrey Stedfast <fejj@ximian.com> + * camel-store.c (camel_store_init): Make the folder_lock + recursive. See bug #22363 for details. Basically, + get_folder_info() is requesting a diary folder which in turn + connects which then calls get_folder() but deadlocks because + get_folder_info already holds the lock. + + * camel-mime-message.c (camel_mime_message_set_date): Don't adjust + the timezone offset if we used tm.tm_gmtoff because it is already + adjusted. + +2002-04-09 Jeffrey Stedfast <fejj@ximian.com> + * camel-tcp-stream-ssl.c (stream_connect): Backport non-blocking connect code. Hopefully this fixes the Operation In Progress errors. diff --git a/camel/camel-mime-message.c b/camel/camel-mime-message.c index 3383e51ba..ef157b7df 100644 --- a/camel/camel-mime-message.c +++ b/camel/camel-mime-message.c @@ -209,8 +209,11 @@ camel_mime_message_set_date (CamelMimeMessage *message, time_t date, int offset tz = -local->tm_gmtoff; #endif offset = -(((tz/60/60) * 100) + (tz/60 % 60)); +#ifdef HAVE_TIMEZONE + /* tm.tm_gmtoff is already adjusted for DST */ if (local->tm_isdst>0) offset += 100; +#endif } message->date = date; message->date_offset = offset; diff --git a/camel/camel-private.h b/camel/camel-private.h index b73ef9a36..6a95c4e04 100644 --- a/camel/camel-private.h +++ b/camel/camel-private.h @@ -59,14 +59,14 @@ struct _CamelFolderPrivate { struct _CamelStorePrivate { #ifdef ENABLE_THREADS - GMutex *folder_lock; /* for locking folder operations */ - GMutex *cache_lock; /* for locking access to the cache */ + EMutex *folder_lock; /* for locking folder operations */ + EMutex *cache_lock; /* for locking access to the cache */ #endif }; #ifdef ENABLE_THREADS -#define CAMEL_STORE_LOCK(f, l) (g_mutex_lock(((CamelStore *)f)->priv->l)) -#define CAMEL_STORE_UNLOCK(f, l) (g_mutex_unlock(((CamelStore *)f)->priv->l)) +#define CAMEL_STORE_LOCK(f, l) (e_mutex_lock(((CamelStore *)f)->priv->l)) +#define CAMEL_STORE_UNLOCK(f, l) (e_mutex_unlock(((CamelStore *)f)->priv->l)) #else #define CAMEL_STORE_LOCK(f, l) #define CAMEL_STORE_UNLOCK(f, l) diff --git a/camel/camel-store.c b/camel/camel-store.c index 41676c53f..52e89fbbb 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -127,8 +127,8 @@ camel_store_init (void *o) store->priv = g_malloc0 (sizeof (*store->priv)); #ifdef ENABLE_THREADS - store->priv->folder_lock = g_mutex_new (); - store->priv->cache_lock = g_mutex_new (); + store->priv->folder_lock = e_mutex_new (E_MUTEX_REC); + store->priv->cache_lock = e_mutex_new (E_MUTEX_SIMPLE); #endif } @@ -147,8 +147,8 @@ camel_store_finalize (CamelObject *object) } #ifdef ENABLE_THREADS - g_mutex_free (store->priv->folder_lock); - g_mutex_free (store->priv->cache_lock); + e_mutex_destroy (store->priv->folder_lock); + e_mutex_destroy (store->priv->cache_lock); #endif g_free (store->priv); } |