mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-11 07:17:58 +00:00
Provide base structures for getaddrinfo.
This commit is contained in:
parent
4a502e1380
commit
bec40c5b68
4
util.c
4
util.c
@ -1728,7 +1728,7 @@ out:
|
||||
|
||||
static bool setup_stratum_socket(struct pool *pool)
|
||||
{
|
||||
struct addrinfo *servinfo, *hints, *p;
|
||||
struct addrinfo servinfobase, *servinfo, *hints, pbase, *p;
|
||||
int sockd;
|
||||
|
||||
mutex_lock(&pool->stratum_lock);
|
||||
@ -1742,6 +1742,8 @@ static bool setup_stratum_socket(struct pool *pool)
|
||||
memset(hints, 0, sizeof(struct addrinfo));
|
||||
hints->ai_family = AF_UNSPEC;
|
||||
hints->ai_socktype = SOCK_STREAM;
|
||||
servinfo = &servinfobase;
|
||||
p = &pbase;
|
||||
if (getaddrinfo(pool->sockaddr_url, pool->stratum_port, hints, &servinfo) != 0) {
|
||||
if (!pool->probed) {
|
||||
applog(LOG_WARNING, "Failed to resolve (?wrong URL) %s:%s",
|
||||
|
Loading…
Reference in New Issue
Block a user