From ac47f7f3a6d52d5a3e1d161a487166560b927d32 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 29 Sep 2012 14:16:16 +1000 Subject: [PATCH] Store and display stripped url in its own variable. --- cgminer.c | 3 ++- miner.h | 1 + util.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cgminer.c b/cgminer.c index b800ffec..36bd6314 100644 --- a/cgminer.c +++ b/cgminer.c @@ -4154,7 +4154,8 @@ static inline int cp_prio(void) static void pool_resus(struct pool *pool) { - applog(LOG_WARNING, "Pool %d %s alive", pool->pool_no, pool->rpc_url); + applog(LOG_WARNING, "Pool %d %s alive", pool->pool_no, + pool->has_stratum ? pool->stratum_url : pool->rpc_url); if (pool->prio < cp_prio() && pool_strategy == POOL_FAILOVER) switch_pools(NULL); } diff --git a/miner.h b/miner.h index fe617fca..7a1df40d 100644 --- a/miner.h +++ b/miner.h @@ -833,6 +833,7 @@ struct pool { struct cgminer_pool_stats cgminer_pool_stats; /* Stratum variables */ + char *stratum_url; SOCKETTYPE sock; struct sockaddr_in *server, client; char *subscription; diff --git a/util.c b/util.c index a2e71519..0c4b7368 100644 --- a/util.c +++ b/util.c @@ -843,6 +843,7 @@ bool extract_sockaddr(struct pool *pool, char *url) } pool->server = (struct sockaddr_in *)res->ai_addr; + pool->stratum_url = strdup(url_address); return true; }