mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-10 23:08:07 +00:00
Protect pool name with lock
This commit is contained in:
parent
897ca9fd4c
commit
f9a2c8b929
4
api.c
4
api.c
@ -1818,7 +1818,9 @@ static void poolstatus(struct io_data *io_data, __maybe_unused SOCKETTYPE c, __m
|
||||
lp = (char *)NO;
|
||||
|
||||
root = api_add_int(root, "POOL", &i, false);
|
||||
root = api_add_string(root, "Name", get_pool_name(pool), false);
|
||||
mutex_lock(&pool->stratum_lock);
|
||||
root = api_add_string(root, "Name", get_pool_name(pool), true);
|
||||
mutex_unlock(&pool->stratum_lock);
|
||||
root = api_add_escape(root, "URL", pool->rpc_url, false);
|
||||
root = api_add_string(root, "Algorithm", pool->algorithm.name, false);
|
||||
root = api_add_string(root, "Description", pool->description, false);
|
||||
|
Loading…
Reference in New Issue
Block a user