Browse Source

There is no need for addrinfo any more.

Con Kolivas 13 years ago
parent
commit
c2861d683a
1 changed files with 0 additions and 13 deletions
  1. 0 13
      util.c

+ 0 - 13
util.c

@@ -836,7 +836,6 @@ bool extract_sockaddr(struct pool *pool, char *url)
 {
 {
 	char *url_begin, *url_end, *port_start = NULL;
 	char *url_begin, *url_end, *port_start = NULL;
 	char url_address[256], port[6];
 	char url_address[256], port[6];
-	struct addrinfo hints, *res;
 	int url_len, port_len = 0;
 	int url_len, port_len = 0;
 
 
 	pool->sockaddr_url = url;
 	pool->sockaddr_url = url;
@@ -866,18 +865,6 @@ bool extract_sockaddr(struct pool *pool, char *url)
 		strcpy(port, "80");
 		strcpy(port, "80");
 
 
 	pool->stratum_port = strdup(port);
 	pool->stratum_port = strdup(port);
-
-	memset(&hints, 0, sizeof(struct addrinfo));
-	hints.ai_family = AF_UNSPEC;
-	hints.ai_socktype = SOCK_STREAM;
-	hints.ai_protocol = IPPROTO_TCP;
-
-	if (getaddrinfo(url_address, port, &hints, &res)) {
-		applog(LOG_DEBUG, "Failed to extract sock addr");
-		return false;
-	}
-	freeaddrinfo(res);
-
 	pool->sockaddr_url = strdup(url_address);
 	pool->sockaddr_url = strdup(url_address);
 
 
 	return true;
 	return true;