From 7d6bcab899192806b106b5fb73d4ea736aa34431 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Mon, 8 Oct 2012 22:15:30 +1100 Subject: [PATCH] Use the stratum url as the rpc url advertised if we switch to it. --- cgminer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cgminer.c b/cgminer.c index 4add1cd3..c410c722 100644 --- a/cgminer.c +++ b/cgminer.c @@ -4285,6 +4285,8 @@ retry_stratum: * and if so, switch to that in preference to getwork if it works */ if (pool->stratum_url && stratum_works(pool)) { applog(LOG_NOTICE, "Switching pool %d %s to %s", pool->pool_no, pool->rpc_url, pool->stratum_url); + free(pool->rpc_url); + pool->rpc_url = strdup(pool->stratum_url); pool->has_stratum = true; curl_easy_cleanup(curl);