From 88e2cf7b349e03b47a7d72eaaebdd5ee067b0af5 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 25 Jun 2011 20:22:23 +1000 Subject: [PATCH] Initialise libcurl properly. --- cpu-miner.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cpu-miner.c b/cpu-miner.c index a1aa0906..fb9232d5 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -1303,6 +1303,8 @@ int main (int argc, char *argv[]) if (unlikely(pthread_mutex_init(&get_lock, NULL))) return 1; + if (unlikely(curl_global_init(CURL_GLOBAL_ALL))) + return 1; #ifdef HAVE_SYSLOG_H if (use_syslog) openlog("cpuminer", LOG_PID, LOG_USER); @@ -1408,6 +1410,7 @@ int main (int argc, char *argv[]) /* main loop - simply wait for workio thread to exit */ pthread_join(thr_info[work_thr_id].pth, NULL); + curl_global_cleanup(); applog(LOG_INFO, "workio thread dead, exiting.");