Browse Source

core: use pool->name instead of pool->poolname in code merged from `port-ckolivas`.

build-mingw
Noel Maersk 11 years ago
parent
commit
47a98cde9f
  1. 10
      sgminer.c

10
sgminer.c

@ -7189,7 +7189,7 @@ static void *watchpool_thread(void __maybe_unused *userdata)
/* Get a rolling utility per pool over 10 mins */ /* Get a rolling utility per pool over 10 mins */
if (intervals > 19) { if (intervals > 19) {
applog(LOG_DEBUG, "Getting rolling utility for %s", pool->poolname); applog(LOG_DEBUG, "Getting rolling utility for %s", pool->name);
int shares = pool->diff1 - pool->last_shares; int shares = pool->diff1 - pool->last_shares;
pool->last_shares = pool->diff1; pool->last_shares = pool->diff1;
@ -7198,21 +7198,21 @@ static void *watchpool_thread(void __maybe_unused *userdata)
} }
if (pool->state == POOL_DISABLED) { if (pool->state == POOL_DISABLED) {
applog(LOG_DEBUG, "Skipping disabled %s", pool->poolname); applog(LOG_DEBUG, "Skipping disabled %s", pool->name);
continue; continue;
} }
/* Don't start testing any pools if the test threads /* Don't start testing any pools if the test threads
* from startup are still doing their first attempt. */ * from startup are still doing their first attempt. */
if (unlikely(pool->testing)) { if (unlikely(pool->testing)) {
applog(LOG_DEBUG, "Testing %s", pool->poolname); applog(LOG_DEBUG, "Testing %s", pool->name);
pthread_join(pool->test_thread, NULL); pthread_join(pool->test_thread, NULL);
pool->testing = false; pool->testing = false;
} }
/* Test pool is idle once every minute */ /* Test pool is idle once every minute */
if (pool->idle && now.tv_sec - pool->tv_idle.tv_sec > 30) { if (pool->idle && now.tv_sec - pool->tv_idle.tv_sec > 30) {
applog(LOG_DEBUG, "Testing idle %s", pool->poolname); applog(LOG_DEBUG, "Testing idle %s", pool->name);
cgtime(&pool->tv_idle); cgtime(&pool->tv_idle);
if (pool_active(pool, true) && pool_tclear(pool, &pool->idle)) if (pool_active(pool, true) && pool_tclear(pool, &pool->idle))
pool_resus(pool); pool_resus(pool);
@ -7230,7 +7230,7 @@ static void *watchpool_thread(void __maybe_unused *userdata)
} }
if (current_pool()->idle) { if (current_pool()->idle) {
applog(LOG_DEBUG, "%s is idle, switching pools", current_pool()->poolname); applog(LOG_DEBUG, "%s is idle, switching pools", current_pool()->name);
switch_pools(NULL); switch_pools(NULL);
} }

Loading…
Cancel
Save