[evolution-ews] Call g_thread_init() conditionally
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Call g_thread_init() conditionally
- Date: Mon, 24 Oct 2011 07:44:11 +0000 (UTC)
commit c95d0e0d3422aaea8deb6d9cbbe8b361d817a599
Author: Milan Crha <mcrha redhat com>
Date: Mon Oct 24 09:43:57 2011 +0200
Call g_thread_init() conditionally
src/addressbook/e-book-backend-sqlitedb-test.c | 2 ++
src/addressbook/ews-oab-decoder.c | 2 ++
src/addressbook/lzx/ews-oal-decompress.c | 2 ++
src/server/tests/test-autocompletion.c | 2 ++
src/server/tests/test-connection.c | 2 ++
src/server/tests/test-createfolder.c | 2 ++
src/server/tests/test-cuditem.c | 2 ++
src/server/tests/test-deletefolder.c | 2 ++
src/server/tests/test-getattachment.c | 2 ++
src/server/tests/test-syncfolder.c | 2 ++
10 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-sqlitedb-test.c b/src/addressbook/e-book-backend-sqlitedb-test.c
index d0a3412..8cf02c5 100644
--- a/src/addressbook/e-book-backend-sqlitedb-test.c
+++ b/src/addressbook/e-book-backend-sqlitedb-test.c
@@ -194,7 +194,9 @@ gint
main (gint argc, gchar *argv[])
{
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
g_thread_init (NULL);
+ #endif
if (argc != 2) {
g_print ("Please enter a path to store the cache \n");
diff --git a/src/addressbook/ews-oab-decoder.c b/src/addressbook/ews-oab-decoder.c
index 05590e3..d9f5d04 100644
--- a/src/addressbook/ews-oab-decoder.c
+++ b/src/addressbook/ews-oab-decoder.c
@@ -1018,7 +1018,9 @@ main (gint argc, gchar *argv [])
struct _db_data data;
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
g_thread_init (NULL);
+ #endif
if (argc != 3) {
g_print ("Pass the oab filename and cache dir as argument \n");
diff --git a/src/addressbook/lzx/ews-oal-decompress.c b/src/addressbook/lzx/ews-oal-decompress.c
index d230cec..a8db8e6 100644
--- a/src/addressbook/lzx/ews-oal-decompress.c
+++ b/src/addressbook/lzx/ews-oal-decompress.c
@@ -265,7 +265,9 @@ main (int argc, char *argv [])
}
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
g_thread_init (NULL);
+ #endif
if (oal_decompress_v4_full_detail_file (argv [1], argv [2], NULL))
g_print ("Successfully decompressed \n");
diff --git a/src/server/tests/test-autocompletion.c b/src/server/tests/test-autocompletion.c
index 9783c20..3efd1c0 100644
--- a/src/server/tests/test-autocompletion.c
+++ b/src/server/tests/test-autocompletion.c
@@ -108,7 +108,9 @@ autocompletion_tests_run ()
g_print ("Testing autocompletion... \n");
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
g_thread_init (NULL);
+ #endif
main_loop = g_main_loop_new (NULL, TRUE);
g_idle_add ((GSourceFunc) idle_cb, NULL);
diff --git a/src/server/tests/test-connection.c b/src/server/tests/test-connection.c
index db543fa..a653b16 100644
--- a/src/server/tests/test-connection.c
+++ b/src/server/tests/test-connection.c
@@ -167,7 +167,9 @@ idle_cb (gpointer data)
void connection_tests_run ()
{
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
g_thread_init (NULL);
+ #endif
main_loop = g_main_loop_new (NULL, TRUE);
g_idle_add ((GSourceFunc) idle_cb, NULL);
diff --git a/src/server/tests/test-createfolder.c b/src/server/tests/test-createfolder.c
index b828aca..81dac10 100644
--- a/src/server/tests/test-createfolder.c
+++ b/src/server/tests/test-createfolder.c
@@ -101,7 +101,9 @@ void
createfolder_tests_run ()
{
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
g_thread_init (NULL);
+ #endif
main_loop = g_main_loop_new (NULL, TRUE);
g_idle_add ((GSourceFunc) idle_cb, NULL);
diff --git a/src/server/tests/test-cuditem.c b/src/server/tests/test-cuditem.c
index 320f94c..5d50e3a 100644
--- a/src/server/tests/test-cuditem.c
+++ b/src/server/tests/test-cuditem.c
@@ -130,7 +130,9 @@ idle_cb (gpointer data)
void cuditem_tests_run ()
{
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
g_thread_init (NULL);
+ #endif
main_loop = g_main_loop_new (NULL, TRUE);
g_idle_add ((GSourceFunc) idle_cb, NULL);
diff --git a/src/server/tests/test-deletefolder.c b/src/server/tests/test-deletefolder.c
index 0a04f59..afa5473 100644
--- a/src/server/tests/test-deletefolder.c
+++ b/src/server/tests/test-deletefolder.c
@@ -96,7 +96,9 @@ deletefolder_tests_run (gconstpointer data)
g_return_if_fail (*fid != NULL);
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
g_thread_init (NULL);
+ #endif
main_loop = g_main_loop_new (NULL, TRUE);
g_idle_add ((GSourceFunc) idle_cb, fid);
diff --git a/src/server/tests/test-getattachment.c b/src/server/tests/test-getattachment.c
index 48fba9e..07071e2 100644
--- a/src/server/tests/test-getattachment.c
+++ b/src/server/tests/test-getattachment.c
@@ -109,7 +109,9 @@ idle_cb (gpointer data)
void get_attachments_tests_run ()
{
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
g_thread_init (NULL);
+ #endif
main_loop = g_main_loop_new (NULL, TRUE);
g_idle_add ((GSourceFunc) idle_cb, NULL);
diff --git a/src/server/tests/test-syncfolder.c b/src/server/tests/test-syncfolder.c
index 870fe0f..1849215 100644
--- a/src/server/tests/test-syncfolder.c
+++ b/src/server/tests/test-syncfolder.c
@@ -245,7 +245,9 @@ void op_tests_run ()
g_print ("Testing operations... \n");
g_type_init ();
+ #if !GLIB_CHECK_VERSION(2,31,0)
g_thread_init (NULL);
+ #endif
main_loop = g_main_loop_new (NULL, TRUE);
g_idle_add ((GSourceFunc) idle_cb, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]