~ubuntu-branches/ubuntu/trusty/gconf/trusty-proposed

« back to all changes in this revision

Viewing changes to gconf/gconf-dbus.c

  • Committer: Package Import Robot
  • Author(s): Chow Loong Jin
  • Date: 2012-09-11 10:12:41 UTC
  • Revision ID: package-import@ubuntu.com-20120911101241-qxjzo7v47c8sa5oc
Tags: 3.2.5-0ubuntu3
* debian/patches/call-dbus_g_thread_init.patch:
  - Initialize dbus threads before doing anything. This fixes crashes in
    multithreaded applications that don't use libdbus directly. (LP: #1048341)

Show diffs side-by-side

added added

removed removed

Lines of Context:
396
396
      return FALSE;
397
397
    }
398
398
 
 
399
  /* Initialize DBus Glib for multithreading -- this fixes race conditions when
 
400
     multi-threaded applications use gconf. Additionally, although the API
 
401
     documentation says that dbus_g_thread_init() may only be called once, it is
 
402
     actually really a wrapper for dbus_threads_init_default() which casn be
 
403
     called as many times as necessary. */
 
404
  dbus_g_thread_init ();
 
405
 
399
406
  dbus_error_init (&error);
400
407
 
401
408
  global_conn = dbus_bus_get_private (DBUS_BUS_SESSION, &error);