Commit ac47f7f3a6d52d5a3e1d161a487166560b927d32

Con Kolivas 2012-09-29T14:16:16

Store and display stripped url in its own variable.

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;
 }