Browse Source

Merge commit '6174c80' into stratum

Conflicts:
	miner.c
Luke Dashjr 13 years ago
parent
commit
1e63790d87
1 changed files with 6 additions and 4 deletions
  1. 6 4
      miner.c

+ 6 - 4
miner.c

@@ -696,8 +696,10 @@ static char *set_url(char *arg)
 		add_pool();
 	pool = pools[total_urls - 1];
 
-	if (detect_stratum(pool, arg))
+	if (detect_stratum(pool, arg)) {
+		pool->rpc_url = strdup(pool->stratum_url);
 		return NULL;
+	}
 
 	opt_set_charp(arg, &pool->rpc_url);
 	if (strncmp(arg, "http://", 7) &&
@@ -5158,8 +5160,7 @@ static inline int cp_prio(void)
 
 static void pool_resus(struct pool *pool)
 {
-	applog(LOG_WARNING, "Pool %d %s alive", pool->pool_no,
-	       pool->has_stratum ? pool->stratum_url : pool->rpc_url);
+	applog(LOG_WARNING, "Pool %d %s alive", pool->pool_no, pool->rpc_url);
 	if (pool->prio < cp_prio() && pool_strategy == POOL_FAILOVER)
 		switch_pools(NULL);
 }
@@ -6586,7 +6587,8 @@ static bool input_pool(bool live)
 		strncat(httpinput, url, 248);
 		free(url);
 		url = httpinput;
-	}
+	} else
+		url = strdup(pool->stratum_url);
 
 	add_pool_details(pool, live, url, user, pass);
 	ret = true;