From 532587eba4822b722511548fb84a8982a0883ace Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Fri, 22 Jul 2011 17:23:57 +1000 Subject: [PATCH] Set priority correctly on multipools. Display priority and alive/dead information in display_pools. --- main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index 3ceab205..21826304 100644 --- a/main.c +++ b/main.c @@ -248,7 +248,7 @@ static void add_pool(void) applog(LOG_ERR, "Failed to malloc pool in add_pool"); exit (1); } - pool->pool_no = total_pools; + pool->pool_no = pool->prio = total_pools; pools[total_pools++] = pool; if (unlikely(pthread_mutex_init(&pool->pool_lock, NULL))) { applog(LOG_ERR, "Failed to pthread_mutex_init in add_pool"); @@ -1459,8 +1459,12 @@ updated: wattron(logwin, A_BOLD); if (!pool->enabled) wattron(logwin, A_DIM); - wprintw(logwin, "%s Pool %d: %s User:%s\n", pool->enabled? "Enabled" : "Disabled", - pool->pool_no, pool->rpc_url, pool->rpc_user); + wprintw(logwin, "%d: %s %s Priority %d: %s User:%s\n", + pool->pool_no, + pool->enabled? "Enabled" : "Disabled", + pool->idle? "Dead" : "Alive", + pool->prio, + pool->rpc_url, pool->rpc_user); wattroff(logwin, A_BOLD | A_DIM); } retry: