1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-22 20:44:19 +00:00

config: use get_pool_name() in set_pool_algorithm() and set_pool_nfactor().

This commit is contained in:
Noel Maersk 2014-04-07 22:21:57 +03:00
parent af879b1c77
commit 53a199a21d

View File

@ -783,11 +783,7 @@ static char *set_url(char *arg)
static char *set_pool_algorithm(char *arg) static char *set_pool_algorithm(char *arg)
{ {
struct pool *pool; struct pool *pool = get_current_pool();
while ((json_array_index + 1) > total_pools)
add_pool();
pool = pools[json_array_index];
applog(LOG_DEBUG, "Setting pool %i algorithm to %s", pool->pool_no, arg); applog(LOG_DEBUG, "Setting pool %i algorithm to %s", pool->pool_no, arg);
set_algorithm(&pool->algorithm, arg); set_algorithm(&pool->algorithm, arg);
@ -797,11 +793,7 @@ static char *set_pool_algorithm(char *arg)
static char *set_pool_nfactor(char *arg) static char *set_pool_nfactor(char *arg)
{ {
struct pool *pool; struct pool *pool = get_current_pool();
while ((json_array_index + 1) > total_pools)
add_pool();
pool = pools[json_array_index];
applog(LOG_DEBUG, "Setting pool %i N-factor to %s", pool->pool_no, arg); applog(LOG_DEBUG, "Setting pool %i N-factor to %s", pool->pool_no, arg);
set_algorithm_nfactor(&pool->algorithm, (const uint8_t) atoi(arg)); set_algorithm_nfactor(&pool->algorithm, (const uint8_t) atoi(arg));