Compare commits
2 Commits
66150609c3
...
69da015727
Author | SHA1 | Date | |
---|---|---|---|
69da015727 | |||
1ab6ffe44f |
@@ -89,7 +89,6 @@ int create_remote (int network,char transport,char* address,int port,struct sock
|
||||
|
||||
|
||||
memset(&hints,'\0',sizeof(hints));
|
||||
// hints.ai_family = int_to_inet(network); /* AF_INET if network is 4, AF_INET6 if it is 6 */
|
||||
hints.ai_socktype = char_to_socktype(transport);
|
||||
|
||||
err_code = getaddrinfo(address,port_str,&hints,&results);
|
||||
@@ -106,11 +105,6 @@ int create_remote (int network,char transport,char* address,int port,struct sock
|
||||
if (socket < 0) {
|
||||
exit(errno);
|
||||
}
|
||||
unsigned char ip[100]= "";
|
||||
|
||||
inet_ntop(int_to_inet(network), &results->ai_addr->sa_data[2], ip, sizeof(ip));
|
||||
printf ("IP address: %s\n\n", ip);
|
||||
|
||||
|
||||
int addrlen;
|
||||
if (network == 4) {
|
||||
|
Reference in New Issue
Block a user