|
|
@ -62,7 +62,7 @@ int create_local (int network, char transport, char* address, int port,struct so
|
|
|
|
} else if (network == 6) {
|
|
|
|
} else if (network == 6) {
|
|
|
|
addrlen = sizeof(struct sockaddr_in6);
|
|
|
|
addrlen = sizeof(struct sockaddr_in6);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
return -207;
|
|
|
|
return -202;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* The value of addrlen should be the size of the 'sockaddr'.
|
|
|
|
/* The value of addrlen should be the size of the 'sockaddr'.
|
|
|
@ -94,7 +94,7 @@ int create_remote (int network,char transport,char* address,int port,struct sock
|
|
|
|
|
|
|
|
|
|
|
|
err_code = getaddrinfo(address,port_str,&hints,&results);
|
|
|
|
err_code = getaddrinfo(address,port_str,&hints,&results);
|
|
|
|
if (err_code != 0) {
|
|
|
|
if (err_code != 0) {
|
|
|
|
exit(err_code);
|
|
|
|
return (-1 * err_code);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
remote_addr_struct = results->ai_addr;
|
|
|
|
remote_addr_struct = results->ai_addr;
|
|
|
|
network = inet_to_int(results->ai_family);
|
|
|
|
network = inet_to_int(results->ai_family);
|
|
|
|