mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-25 22:14:36 +00:00
Initialise libcurl properly.
This commit is contained in:
parent
656b485d80
commit
88e2cf7b34
@ -1303,6 +1303,8 @@ int main (int argc, char *argv[])
|
|||||||
if (unlikely(pthread_mutex_init(&get_lock, NULL)))
|
if (unlikely(pthread_mutex_init(&get_lock, NULL)))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
|
if (unlikely(curl_global_init(CURL_GLOBAL_ALL)))
|
||||||
|
return 1;
|
||||||
#ifdef HAVE_SYSLOG_H
|
#ifdef HAVE_SYSLOG_H
|
||||||
if (use_syslog)
|
if (use_syslog)
|
||||||
openlog("cpuminer", LOG_PID, LOG_USER);
|
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 */
|
/* main loop - simply wait for workio thread to exit */
|
||||||
pthread_join(thr_info[work_thr_id].pth, NULL);
|
pthread_join(thr_info[work_thr_id].pth, NULL);
|
||||||
|
curl_global_cleanup();
|
||||||
|
|
||||||
applog(LOG_INFO, "workio thread dead, exiting.");
|
applog(LOG_INFO, "workio thread dead, exiting.");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user