telepathy-rakia: Initialize libdbus for thread safety
Simon McVittie
smcv at kemper.freedesktop.org
Tue Jun 4 04:47:29 PDT 2013
Module: telepathy-rakia
Branch: master
Commit: a0ed7591eac1b6987c726191ced42b5f8fa11efa
URL: http://cgit.freedesktop.org/telepathy/telepathy-rakia/commit/?id=a0ed7591eac1b6987c726191ced42b5f8fa11efa
Author: Simon McVittie <simon.mcvittie at collabora.co.uk>
Date: Mon Jun 3 15:22:39 2013 +0100
Initialize libdbus for thread safety
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=54972
Signed-off-by: Simon McVittie <simon.mcvittie at collabora.co.uk>
Reviewed-by: Xavier Claessens <xavier.claessens at collabora.co.uk>
---
src/telepathy-rakia.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/telepathy-rakia.c b/src/telepathy-rakia.c
index 45c952c..305fd43 100644
--- a/src/telepathy-rakia.c
+++ b/src/telepathy-rakia.c
@@ -29,6 +29,9 @@
#include "rakia/debug.h"
#include "sip-connection-manager.h"
+
+#include <dbus/dbus.h>
+
#include <telepathy-glib/run.h>
#include <telepathy-glib/debug.h>
@@ -47,6 +50,9 @@ main (int argc, char** argv)
guint fatal_mask;
const gchar *logfile_string;
+ if (!dbus_threads_init_default ())
+ g_error ("Unable to initialize libdbus thread-safety (out of memory?)");
+
fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
fatal_mask |= G_LOG_LEVEL_CRITICAL;
g_log_set_always_fatal (fatal_mask);
More information about the telepathy-commits
mailing list