[gmime] Initialize mutexes earlier in g_mime_init



commit bb1c6094e04ce54de52289cd5ba7f9b73694ef1f
Author: Jeffrey Stedfast <fejj gnome org>
Date:   Thu Sep 26 08:46:10 2013 -0400

    Initialize mutexes earlier in g_mime_init
    
    2013-09-26  Jeffrey Stedfast  <fejj gnome org>
    
        * gmime/gmime.c (g_mime_init): Initialize the mutexes
        earlier. Fixes bug #708818.

 ChangeLog     |    5 +++++
 gmime/gmime.c |   14 +++++++-------
 2 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5071304..c0e414f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-09-26  Jeffrey Stedfast  <fejj gnome org>
+
+       * gmime/gmime.c (g_mime_init): Initialize the mutexes
+       earlier. Fixes bug #708818.
+
 2013-09-15  Jeffrey Stedfast  <fejj gnome org>
 
        * README: Bumped version
diff --git a/gmime/gmime.c b/gmime/gmime.c
index 89326a4..80c80f5 100644
--- a/gmime/gmime.c
+++ b/gmime/gmime.c
@@ -132,6 +132,13 @@ g_mime_init (guint32 flags)
        g_type_init ();
 #endif
        
+#ifdef G_THREADS_ENABLED
+       g_mutex_init (&G_LOCK_NAME (iconv_cache));
+       g_mutex_init (&G_LOCK_NAME (iconv_utils));
+       g_mutex_init (&G_LOCK_NAME (charset));
+       g_mutex_init (&G_LOCK_NAME (msgid));
+#endif
+       
        g_mime_charset_map_init ();
        g_mime_iconv_utils_init ();
        g_mime_iconv_init ();
@@ -144,13 +151,6 @@ g_mime_init (guint32 flags)
        gmime_gpgme_error_quark = g_quark_from_static_string ("gmime-gpgme");
        gmime_error_quark = g_quark_from_static_string ("gmime");
        
-#ifdef G_THREADS_ENABLED
-       g_mutex_init (&G_LOCK_NAME (iconv_cache));
-       g_mutex_init (&G_LOCK_NAME (iconv_utils));
-       g_mutex_init (&G_LOCK_NAME (charset));
-       g_mutex_init (&G_LOCK_NAME (msgid));
-#endif
-       
        /* register our GObject types with the GType system */
        g_mime_crypto_context_get_type ();
        g_mime_decrypt_result_get_type ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]