From fccd8f908249e7475262cda2d080ae33d81091d6 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Thu, 13 Mar 2008 10:35:28 +0000 Subject: [PATCH] g_thread_init should be called before any other glib function. svn path=/trunk/; revision=1105 --- ChangeLog | 12 ++++++++++++ tests/dns.c | 2 +- tests/get.c | 2 +- tests/getbug.c | 2 +- tests/simple-httpd.c | 2 +- tests/simple-proxy.c | 2 +- tests/ssl-test.c | 2 +- tests/test-utils.c | 2 +- 8 files changed, 19 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 42c6a6e..9bda0c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-03-13 Xan Lopez + + * tests/dns.c: (main): + * tests/get.c: (main): + * tests/getbug.c: (main): + * tests/simple-httpd.c: (main): + * tests/simple-proxy.c: (main): + * tests/ssl-test.c: (main): + * tests/test-utils.c: (test_init): + + g_thread_init should be called before any other glib function. (#522117) + 2008-03-10 Dan Winship * configure.in: 2.4.0! diff --git a/tests/dns.c b/tests/dns.c index 10d6b98..e93b0a4 100644 --- a/tests/dns.c +++ b/tests/dns.c @@ -41,8 +41,8 @@ main (int argc, char **argv) if (argc < 2) usage (); - g_type_init (); g_thread_init (NULL); + g_type_init (); for (i = 1; i < argc; i++) { addr = soup_address_new (argv[i], 0); diff --git a/tests/get.c b/tests/get.c index a1b12a5..c6cd9d9 100644 --- a/tests/get.c +++ b/tests/get.c @@ -226,8 +226,8 @@ main (int argc, char **argv) gboolean synchronous = FALSE; int opt; - g_type_init (); g_thread_init (NULL); + g_type_init (); method = SOUP_METHOD_GET; diff --git a/tests/getbug.c b/tests/getbug.c index 5cef372..a6c3bc7 100644 --- a/tests/getbug.c +++ b/tests/getbug.c @@ -95,8 +95,8 @@ main (int argc, char **argv) const char *uri = "http://bugzilla.redhat.com/bugzilla/xmlrpc.cgi"; int opt, bug; - g_type_init (); g_thread_init (NULL); + g_type_init (); while ((opt = getopt (argc, argv, "p:")) != -1) { switch (opt) { diff --git a/tests/simple-httpd.c b/tests/simple-httpd.c index 6667251..7c7df62 100644 --- a/tests/simple-httpd.c +++ b/tests/simple-httpd.c @@ -201,8 +201,8 @@ main (int argc, char **argv) int ssl_port = SOUP_ADDRESS_ANY_PORT; const char *ssl_cert_file = NULL, *ssl_key_file = NULL; - g_type_init (); g_thread_init (NULL); + g_type_init (); signal (SIGINT, quit); while ((opt = getopt (argc, argv, "p:k:c:s:")) != -1) { diff --git a/tests/simple-proxy.c b/tests/simple-proxy.c index cc3da2b..fc50063 100644 --- a/tests/simple-proxy.c +++ b/tests/simple-proxy.c @@ -135,8 +135,8 @@ main (int argc, char **argv) int opt; int port = SOUP_ADDRESS_ANY_PORT; - g_type_init (); g_thread_init (NULL); + g_type_init (); signal (SIGINT, quit); while ((opt = getopt (argc, argv, "p:s:")) != -1) { diff --git a/tests/ssl-test.c b/tests/ssl-test.c index 13eed66..92e9902 100644 --- a/tests/ssl-test.c +++ b/tests/ssl-test.c @@ -225,8 +225,8 @@ main (int argc, char **argv) SoupSocketIOStatus status; GError *error = NULL; - g_type_init (); g_thread_init (NULL); + g_type_init (); while ((opt = getopt (argc, argv, "c:d:k:")) != -1) { switch (opt) { diff --git a/tests/test-utils.c b/tests/test-utils.c index b7564a4..3c1005b 100644 --- a/tests/test-utils.c +++ b/tests/test-utils.c @@ -70,8 +70,8 @@ test_init (int argc, char **argv, GOptionEntry *entries) char *name; GError *error = NULL; - g_type_init (); g_thread_init (NULL); + g_type_init (); name = strrchr (argv[0], '/'); if (!name++) -- 2.7.4