[gvfs/gdbus-core: 7/29] gdbus: Bring libdbus threads initialization back



commit d84ea46469a52bc206c9b5ad0d1670214844ec35
Author: Tomas Bzatek <tbzatek redhat com>
Date:   Mon Apr 16 17:08:09 2012 +0200

    gdbus: Bring libdbus threads initialization back
    
    I hate reverting things but this seems to be required for proper
    libdbus threads initialization, further used by gnome-keyring.
    
    This has actually been fixed in gnome-keyring recently (bug 659162)
    but gvfs can still be used with gnome-keyring-2.32.

 daemon/daemon-main.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/daemon/daemon-main.c b/daemon/daemon-main.c
index 4fe0199..aaf301f 100644
--- a/daemon/daemon-main.c
+++ b/daemon/daemon-main.c
@@ -34,6 +34,10 @@
 #include <gvfsbackend.h>
 #include <gvfsdbus.h>
 
+#if HAVE_KEYRING
+#  include <dbus/dbus.h>
+#endif
+
 static char *spawner_id = NULL;
 static char *spawner_path = NULL;
 
@@ -66,6 +70,10 @@ daemon_init (void)
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
   
+#if HAVE_KEYRING
+  /* gnome-keyring needs d-bus threads properly initialized */
+  dbus_threads_init_default ();
+#endif
   g_type_init ();
 
   g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, log_debug, NULL);



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