|
@@ -1012,7 +1012,7 @@ static char *set_rr(enum pool_strategy *strategy)
|
|
|
* stratum+tcp or by detecting a stratum server response */
|
|
* stratum+tcp or by detecting a stratum server response */
|
|
|
bool detect_stratum(struct pool *pool, char *url)
|
|
bool detect_stratum(struct pool *pool, char *url)
|
|
|
{
|
|
{
|
|
|
- if (!extract_sockaddr(pool, url))
|
|
|
|
|
|
|
+ if (!extract_sockaddr(url, &pool->sockaddr_url, &pool->stratum_port))
|
|
|
return false;
|
|
return false;
|
|
|
|
|
|
|
|
if (!strncasecmp(url, "stratum+tcp://", 14)) {
|
|
if (!strncasecmp(url, "stratum+tcp://", 14)) {
|
|
@@ -7769,7 +7769,7 @@ static void *longpoll_thread(void *userdata);
|
|
|
static bool stratum_works(struct pool *pool)
|
|
static bool stratum_works(struct pool *pool)
|
|
|
{
|
|
{
|
|
|
applog(LOG_INFO, "Testing pool %d stratum %s", pool->pool_no, pool->stratum_url);
|
|
applog(LOG_INFO, "Testing pool %d stratum %s", pool->pool_no, pool->stratum_url);
|
|
|
- if (!extract_sockaddr(pool, pool->stratum_url))
|
|
|
|
|
|
|
+ if (!extract_sockaddr(pool->stratum_url, &pool->sockaddr_url, &pool->stratum_port))
|
|
|
return false;
|
|
return false;
|
|
|
|
|
|
|
|
if (pool->stratum_active)
|
|
if (pool->stratum_active)
|
|
@@ -7952,7 +7952,7 @@ badwork:
|
|
|
nohttp:
|
|
nohttp:
|
|
|
/* If we failed to parse a getwork, this could be a stratum
|
|
/* If we failed to parse a getwork, this could be a stratum
|
|
|
* url without the prefix stratum+tcp:// so let's check it */
|
|
* url without the prefix stratum+tcp:// so let's check it */
|
|
|
- if (extract_sockaddr(pool, pool->rpc_url) && initiate_stratum(pool)) {
|
|
|
|
|
|
|
+ if (extract_sockaddr(pool->rpc_url, &pool->sockaddr_url, &pool->stratum_port) && initiate_stratum(pool)) {
|
|
|
pool->has_stratum = true;
|
|
pool->has_stratum = true;
|
|
|
goto retry_stratum;
|
|
goto retry_stratum;
|
|
|
}
|
|
}
|