From 817ed55b6aeed63b1c3c1898fa4290ba89c4e174 Mon Sep 17 00:00:00 2001 From: Joe4782 Date: Sun, 26 Jan 2014 00:56:58 +0000 Subject: [PATCH] Pool management option now shows pool name when available --- sgminer.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sgminer.c b/sgminer.c index a4465999..cf216ddf 100644 --- a/sgminer.c +++ b/sgminer.c @@ -752,7 +752,7 @@ static char *set_disable_pool(char *arg) pool = pools[json_array_index]; len = strlen(arg); - if (len < 0) + if (len < 1) { disabled = 1; } @@ -4397,6 +4397,7 @@ static void display_pools(void) struct pool *pool; int selected, i; char input; + char *disp_name; opt_loginput = true; immedok(logwin, true); @@ -4421,11 +4422,16 @@ updated: wlogprint("Rejecting "); break; } - wlogprint("%s Quota %d Prio %d: %s User:%s\n", + disp_name = pool->poolname; + if (strlen(disp_name) < 1) + { + disp_name = pool->rpc_url; + } + wlogprint("%s Quota %d Prio %d: '%s' User:%s\n", pool->idle? "Dead" : "Alive", pool->quota, pool->prio, - pool->rpc_url, pool->rpc_user); + disp_name, pool->rpc_user); wattroff(logwin, A_BOLD | A_DIM); } retry: