summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorailin-nemui <ailin-nemui@users.noreply.github.com>2017-10-23 14:29:34 +0200
committerGitHub <noreply@github.com>2017-10-23 14:29:34 +0200
commitcfa51c5ae2c06f4b93f443c986ec0bc316c860a4 (patch)
treec469e82c36a28c4134ea387a0f5549baa1a4c3d6 /src/core
parent816df6d153e937734bdac258ad6bf43173361451 (diff)
parent233be9f580290ff3efa66e6256e46303b01781da (diff)
downloadirssi-cfa51c5ae2c06f4b93f443c986ec0bc316c860a4.zip
Merge pull request #770 from horgh/horgh/rm-unused-function
Remove a couple unused functions
Diffstat (limited to 'src/core')
-rw-r--r--src/core/network.c37
-rw-r--r--src/core/network.h7
2 files changed, 3 insertions, 41 deletions
diff --git a/src/core/network.c b/src/core/network.c
index b38c9102..d280b463 100644
--- a/src/core/network.c
+++ b/src/core/network.c
@@ -48,9 +48,6 @@ GIOChannel *g_io_channel_new(int handle)
return chan;
}
-/* Cygwin need this, don't know others.. */
-/*#define BLOCKING_SOCKETS 1*/
-
IPADDR ip4_any = {
AF_INET,
#if defined(IN6ADDR_ANY_INIT)
@@ -113,40 +110,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 d1582a2e..e60f607f 100644
--- a/src/core/network.h
+++ b/src/core/network.h
@@ -33,13 +33,12 @@ extern IPADDR ip4_any;
GIOChannel *g_io_channel_new(int handle);
-/* returns 1 if IPADDRs are the same */
-int net_ip_compare(IPADDR *ip1, IPADDR *ip2);
+/* Returns 1 if IPADDRs are the same. */
+/* Deprecated since it is unused. It will be deleted in a later release. */
+int net_ip_compare(IPADDR *ip1, IPADDR *ip2) G_GNUC_DEPRECATED;
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 */