# HG changeset patch # User Matti Hamalainen # Date 1337999586 -10800 # Node ID 6eef0dc83f0aae53ea4bb1ad8ac316a99be63123 # Parent 69ce77696c5d44811eebbf1099a5baa188369dcc Cosmetics. diff -r 69ce77696c5d -r 6eef0dc83f0a network.c --- a/network.c Sat May 26 05:31:36 2012 +0300 +++ b/network.c Sat May 26 05:33:06 2012 +0300 @@ -92,6 +92,7 @@ struct hostent *nn_resolve_host(nn_conn_t *conn, const char *name) { struct hostent *res = gethostbyname(name); + if (res == NULL) nn_conn_err(conn, "Could not resolve hostname '%s': %s\n", name, strerror(h_errno)); else @@ -116,6 +117,7 @@ return conn; } + static BOOL nn_get_addr(struct in_addr *addr, struct hostent *hst) { if (hst != NULL) @@ -130,6 +132,7 @@ } } + int nn_conn_set_proxy(nn_conn_t *conn, int type, int port, const char *host) { if (conn == NULL) @@ -150,6 +153,7 @@ return 0; } + int nn_conn_open(nn_conn_t *conn, const int port, const char *host) { struct sockaddr_in dest;