summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis@debethencourt.com>2011-02-03 13:41:27 +0100
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>2011-02-03 14:52:34 +0200
commitad5a5243c3a24f736f56fc337750b42d5ef847e2 (patch)
tree30ce2853135fe4788537aa36404f60148597c330 /tools
parentb0412f76cf67e4369bea1387f80c49ace1f5fa8d (diff)
downloadgupnp-dlna-ad5a5243c3a24f736f56fc337750b42d5ef847e2.tar.gz
Only initialize thread system once
Added a check to see if g_threads are supported before initializing g_threads.
Diffstat (limited to 'tools')
-rw-r--r--tools/gupnp-dlna-info.c3
-rw-r--r--tools/gupnp-dlna-ls-profiles.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/tools/gupnp-dlna-info.c b/tools/gupnp-dlna-info.c
index c26d56c..54edd45 100644
--- a/tools/gupnp-dlna-info.c
+++ b/tools/gupnp-dlna-info.c
@@ -452,7 +452,8 @@ main (int argc, char **argv)
GOptionContext *ctx;
- g_thread_init(NULL);
+ if (!g_thread_supported ())
+ g_thread_init(NULL);
ctx = g_option_context_new (" - program to extract DLNA and related metadata");
g_option_context_add_main_entries (ctx, options, NULL);
diff --git a/tools/gupnp-dlna-ls-profiles.c b/tools/gupnp-dlna-ls-profiles.c
index 7862061..567ef8d 100644
--- a/tools/gupnp-dlna-ls-profiles.c
+++ b/tools/gupnp-dlna-ls-profiles.c
@@ -103,7 +103,8 @@ main (int argc, char **argv)
GOptionContext *ctx;
- g_thread_init(NULL);
+ if (!g_thread_supported ())
+ g_thread_init(NULL);
ctx = g_option_context_new (" - program to list all the DLNA profiles supported by gupnp-dlna");
g_option_context_add_main_entries (ctx, options, NULL);