version 1.162, 2016/08/13 13:09:10 |
version 1.163, 2016/09/03 17:35:34 |
|
|
remote_connect(const char *host, const char *port, struct addrinfo hints) |
remote_connect(const char *host, const char *port, struct addrinfo hints) |
{ |
{ |
struct addrinfo *res, *res0; |
struct addrinfo *res, *res0; |
int s, error, on = 1, save_errno; |
int s = -1, error, on = 1, save_errno; |
|
|
if ((error = getaddrinfo(host, port, &hints, &res0))) |
if ((error = getaddrinfo(host, port, &hints, &res0))) |
errx(1, "getaddrinfo: %s", gai_strerror(error)); |
errx(1, "getaddrinfo: %s", gai_strerror(error)); |
|
|
local_listen(char *host, char *port, struct addrinfo hints) |
local_listen(char *host, char *port, struct addrinfo hints) |
{ |
{ |
struct addrinfo *res, *res0; |
struct addrinfo *res, *res0; |
int s, ret, x = 1, save_errno; |
int s = -1, ret, x = 1, save_errno; |
int error; |
int error; |
|
|
/* Allow nodename to be null. */ |
/* Allow nodename to be null. */ |