From 01e96606f011991a6129cc6274f45e1546212a6f Mon Sep 17 00:00:00 2001 From: troky Date: Fri, 11 Apr 2014 10:41:37 +0200 Subject: [PATCH] Fixed (pool) algo selection. --- sgminer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sgminer.c b/sgminer.c index 9027496b..66735da8 100644 --- a/sgminer.c +++ b/sgminer.c @@ -1063,7 +1063,7 @@ static void load_temp_cutoffs() static char *set_algo(const char *arg) { - if (json_array_index < 0) { + if ((json_array_index < 0) || (total_pools == 0)) { set_algorithm(opt_algorithm, arg); applog(LOG_INFO, "Set default algorithm to %s", opt_algorithm->name); } else { @@ -1075,7 +1075,7 @@ static char *set_algo(const char *arg) static char *set_nfactor(const char *arg) { - if (json_array_index < 0) { + if ((json_array_index < 0) || (total_pools == 0)) { set_algorithm_nfactor(opt_algorithm, (const uint8_t) atoi(arg)); applog(LOG_INFO, "Set algorithm N-factor to %d (N to %d)", opt_algorithm->nfactor, opt_algorithm->n);