diff options
author | Will Storey <will@summercat.com> | 2017-10-09 13:20:44 -0700 |
---|---|---|
committer | Will Storey <will@summercat.com> | 2017-10-09 13:20:44 -0700 |
commit | b8b90c76d4ea87d7e50c2a34fbc36ab732e3e89e (patch) | |
tree | 505fbb642654841ce9d098832096cb67132c25e2 /src/core | |
parent | 3b3939b146bb2f80182d572a2afc08ba405037a1 (diff) | |
download | irssi-b8b90c76d4ea87d7e50c2a34fbc36ab732e3e89e.zip |
Delete unused function net_connect()
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/network.c | 34 | ||||
-rw-r--r-- | src/core/network.h | 2 |
2 files changed, 0 insertions, 36 deletions
diff --git a/src/core/network.c b/src/core/network.c index 38f4e65a..52619e4f 100644 --- a/src/core/network.c +++ b/src/core/network.c @@ -98,40 +98,6 @@ static int sin_get_port(union sockaddr_union *so) so->sin.sin_port); } -/* Connect to socket */ -GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip) -{ - IPADDR ip4, ip6, *ip; - - g_return_val_if_fail(addr != NULL, NULL); - - if (net_gethostbyname(addr, &ip4, &ip6) == -1) - return NULL; - - if (my_ip == NULL) { - /* prefer IPv4 addresses */ - ip = ip4.family != 0 ? &ip4 : &ip6; - } else if (IPADDR_IS_V6(my_ip)) { - /* my_ip is IPv6 address, use it if possible */ - if (ip6.family != 0) - ip = &ip6; - else { - my_ip = NULL; - ip = &ip4; - } - } else { - /* my_ip is IPv4 address, use it if possible */ - if (ip4.family != 0) - ip = &ip4; - else { - my_ip = NULL; - ip = &ip6; - } - } - - return net_connect_ip(ip, port, my_ip); -} - int net_connect_ip_handle(const IPADDR *ip, int port, const IPADDR *my_ip) { union sockaddr_union so; diff --git a/src/core/network.h b/src/core/network.h index 471ab2d8..a02f0db9 100644 --- a/src/core/network.h +++ b/src/core/network.h @@ -35,8 +35,6 @@ GIOChannel *g_io_channel_new(int handle); int net_connect_ip_handle(const IPADDR *ip, int port, const IPADDR *my_ip); -/* Connect to socket */ -GIOChannel *net_connect(const char *addr, int port, IPADDR *my_ip) G_GNUC_DEPRECATED; /* Connect to socket with ip address and SSL*/ GIOChannel *net_connect_ip_ssl(IPADDR *ip, int port, IPADDR *my_ip, SERVER_REC *server); /* Start TLS */ |