1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-30 16:34:23 +00:00

Do not do any setup if opt_api_listen is disabled in api.c.

This commit is contained in:
Con Kolivas 2012-12-10 10:51:40 +11:00
parent 2b5467c44c
commit f3b96b8d26

10
api.c
View File

@ -3482,16 +3482,16 @@ void api(int api_thr_id)
bool did; bool did;
int i; int i;
mutex_init(&quit_restart_lock);
pthread_cleanup_push(tidyup, NULL);
my_thr_id = api_thr_id;
if (!opt_api_listen) { if (!opt_api_listen) {
applog(LOG_DEBUG, "API not running%s", UNAVAILABLE); applog(LOG_DEBUG, "API not running%s", UNAVAILABLE);
return; return;
} }
mutex_init(&quit_restart_lock);
pthread_cleanup_push(tidyup, NULL);
my_thr_id = api_thr_id;
setup_groups(); setup_groups();
if (opt_api_allow) { if (opt_api_allow) {