Show only the URL in the status bar to avoid long prefixes making for extra long lines.
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 39 40 41 42 43 44 45
diff --git a/cgminer.c b/cgminer.c
index 5ad3263..e68d536 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -552,10 +552,10 @@ static char *set_rr(enum pool_strategy *strategy)
* stratum+tcp or by detecting a stratum server response */
bool detect_stratum(struct pool *pool, char *url)
{
- if (opt_scrypt)
+ if (!extract_sockaddr(pool, url))
return false;
- if (!extract_sockaddr(pool, url))
+ if (opt_scrypt)
return false;
if (!strncasecmp(url, "stratum+tcp://", 14)) {
@@ -1588,13 +1588,13 @@ static void curses_print_status(void)
wclrtoeol(statuswin);
if (pool->has_stratum) {
mvwprintw(statuswin, 4, 0, " Connected to %s with stratum as user %s",
- pool->stratum_url, pool->rpc_user);
+ pool->sockaddr_url, pool->rpc_user);
} else if ((pool_strategy == POOL_LOADBALANCE || pool_strategy == POOL_BALANCE) && total_pools > 1) {
mvwprintw(statuswin, 4, 0, " Connected to multiple pools with%s LP",
have_longpoll ? "": "out");
} else {
mvwprintw(statuswin, 4, 0, " Connected to %s with%s LP as user %s",
- pool->rpc_url, have_longpoll ? "": "out", pool->rpc_user);
+ pool->sockaddr_url, have_longpoll ? "": "out", pool->rpc_user);
}
wclrtoeol(statuswin);
mvwprintw(statuswin, 5, 0, " Block: %s... Started: %s Best share: %s ", current_hash, blocktime, best_share);
diff --git a/util.c b/util.c
index 9877afe..cd75c8f 100644
--- a/util.c
+++ b/util.c
@@ -823,6 +823,7 @@ bool extract_sockaddr(struct pool *pool, char *url)
struct addrinfo hints, *res;
int url_len, port_len = 0;
+ pool->sockaddr_url = url;
url_begin = strstr(url, "//");
if (!url_begin)
url_begin = url;