summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2010-02-12 18:41:23 +0000
committerCosimo Alfarano <cosimo.alfarano@collabora.co.uk>2010-02-12 19:26:07 +0000
commit0afec9f70bf205f05d75f08f7a2f0ddd2ba821ba (patch)
tree2b39eccc9ce367142b77a4969f6fb43f157b71e2 /src
parente5d921b41f216915d5b53097e269b2749842669f (diff)
downloadtelepathy-logger-0afec9f70bf205f05d75f08f7a2f0ddd2ba821ba.tar.gz
GThread init before any func call.
* removed g_thred_init from the log manager * initialising thread in main, before anything else
Diffstat (limited to 'src')
-rw-r--r--src/telepathy-logger.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/telepathy-logger.c b/src/telepathy-logger.c
index 7f3b832..e70bc38 100644
--- a/src/telepathy-logger.c
+++ b/src/telepathy-logger.c
@@ -134,6 +134,18 @@ main (int argc,
g_type_init ();
+ /* initialise thread support. It can be called just once, so check it already
+ * ON and call if if it's not.
+ * Threads are needed by Async APIs.
+ */
+ if (!g_thread_supported ())
+ {
+ DEBUG ("Initializing GThread");
+ g_thread_init (NULL);
+ }
+ else
+ DEBUG ("GThread already initialized. Brilliant!");
+
tp_debug_divert_messages (g_getenv ("TPL_LOGFILE"));
#ifdef ENABLE_DEBUG