From c6b2624c1965740fa7b5d2230baf20156ff34151 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 17 Jul 2015 11:01:11 +0100 Subject: Move curl_global_init() to dcpomatic_setup() and remove curl_global_cleanup. --- src/lib/update.cc | 2 -- src/lib/util.cc | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/update.cc b/src/lib/update.cc index 24cd28b16..7a3f0bd5d 100644 --- a/src/lib/update.cc +++ b/src/lib/update.cc @@ -57,7 +57,6 @@ UpdateChecker::UpdateChecker () , _emits (0) , _to_do (0) { - curl_global_init (CURL_GLOBAL_ALL); _curl = curl_easy_init (); curl_easy_setopt (_curl, CURLOPT_URL, "http://dcpomatic.com/update"); @@ -76,7 +75,6 @@ UpdateChecker::~UpdateChecker () /* We are not cleaning up our thread, but hey well */ curl_easy_cleanup (_curl); - curl_global_cleanup (); delete[] _buffer; } diff --git a/src/lib/util.cc b/src/lib/util.cc index 3837aacc7..dad094b6e 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -332,6 +333,8 @@ dcpomatic_setup () CinemaSoundProcessor::setup_cinema_sound_processors (); AudioProcessor::setup_audio_processors (); + curl_global_init (CURL_GLOBAL_ALL); + ui_thread = boost::this_thread::get_id (); } -- cgit v1.2.3