diff options
author | Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> | 2010-02-12 18:41:23 +0000 |
---|---|---|
committer | Cosimo Alfarano <cosimo.alfarano@collabora.co.uk> | 2010-02-12 19:26:07 +0000 |
commit | 0afec9f70bf205f05d75f08f7a2f0ddd2ba821ba (patch) | |
tree | 2b39eccc9ce367142b77a4969f6fb43f157b71e2 /src | |
parent | e5d921b41f216915d5b53097e269b2749842669f (diff) | |
download | telepathy-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.c | 12 |
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 |