summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-07-17 11:01:11 +0100
committerCarl Hetherington <cth@carlh.net>2015-07-17 15:40:55 +0100
commitc6b2624c1965740fa7b5d2230baf20156ff34151 (patch)
tree2e5f1882b59343306815fde5e75d34b22dcf4955
parent9695a0f81ce2a0ccd02cf4608e7151e4f07baabc (diff)
Move curl_global_init() to dcpomatic_setup() and remove curl_global_cleanup.
-rw-r--r--src/lib/update.cc2
-rw-r--r--src/lib/util.cc3
2 files changed, 3 insertions, 2 deletions
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 <dcp/picture_asset.h>
#include <dcp/sound_asset.h>
#include <dcp/subtitle_asset.h>
+#include <curl/curl.h>
#include <glib.h>
#include <pangomm/init.h>
#include <boost/algorithm/string.hpp>
@@ -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 ();
}