Store and display stripped url in its own variable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
diff --git a/cgminer.c b/cgminer.c
index b800ffe..36bd631 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 fe617fc..7a1df40 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 a2e7151..0c4b736 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;
}