From b85d7b5446a92cec50cad99945bda9bf6719010a Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 6 May 2012 14:17:48 +1000 Subject: [PATCH] Revert "Perform all common pool initialisation in add_pool()." This reverts commit f8b66bde28a5a74fbc5688642318c3ca9b1b9e2a. Sets pools to dead by mistake at startup. --- cgminer.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cgminer.c b/cgminer.c index 0d979a16..677e47dd 100644 --- a/cgminer.c +++ b/cgminer.c @@ -395,8 +395,6 @@ static struct pool *add_pool(void) /* Make sure the pool doesn't think we've been idle since time 0 */ pool->tv_idle.tv_sec = ~0UL; - pool->enabled = POOL_ENABLED; - pool->idle = true; return pool; } @@ -5034,6 +5032,13 @@ int main(int argc, char *argv[]) if (opt_benchmark) goto begin_bench; + for (i = 0; i < total_pools; i++) { + struct pool *pool = pools[i]; + + pool->enabled = POOL_ENABLED; + pool->idle = true; + } + applog(LOG_NOTICE, "Probing for an alive pool"); do { /* Look for at least one active pool before starting */