From 3972fe223b3037f8acbe26d6765409ebe2b81d35 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sat, 11 May 2013 15:03:40 +1000 Subject: [PATCH] Show a different warning and loglevel for failure to resolve a URL on first or subsequent testing of stratum pool URLs. --- util.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/util.c b/util.c index 15d90eac..ba98c8a9 100644 --- a/util.c +++ b/util.c @@ -1522,8 +1522,13 @@ static bool setup_stratum_socket(struct pool *pool) hints->ai_family = AF_UNSPEC; hints->ai_socktype = SOCK_STREAM; if (getaddrinfo(pool->sockaddr_url, pool->stratum_port, hints, &servinfo) != 0) { - applog(LOG_WARNING, "Failed to getaddrinfo (?wrong URL) on %s:%s", - pool->sockaddr_url, pool->stratum_port); + if (!pool->probed) { + applog(LOG_WARNING, "Failed to resolve (?wrong URL) %s:%s", + pool->sockaddr_url, pool->stratum_port); + } else { + applog(LOG_INFO, "Failed to getaddrinfo for %s:%s", + pool->sockaddr_url, pool->stratum_port); + } return false; }