diff options
author | Timo Sirainen <cras@irssi.org> | 2001-01-02 07:05:07 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-01-02 07:05:07 +0000 |
commit | d58ea58abcc0805f1b8ed2039db0bade7857d3f7 (patch) | |
tree | 872129a728c0d1ffabaab90986fa61c6b087ec2a /src | |
parent | 806e1f076522cf5677e8eec4469252e6958a30c9 (diff) | |
download | irssi-d58ea58abcc0805f1b8ed2039db0bade7857d3f7.zip |
net_accept(), net_getsockname() IPv6 fixes pointed out by pv2b :)
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1050 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r-- | src/core/network.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/network.c b/src/core/network.c index 61ba909b..ebf3de1f 100644 --- a/src/core/network.c +++ b/src/core/network.c @@ -255,7 +255,7 @@ GIOChannel *net_accept(GIOChannel *handle, IPADDR *addr, int *port) g_return_val_if_fail(handle != NULL, NULL); - addrlen = SIZEOF_SOCKADDR(so); + addrlen = sizeof(so); ret = accept(g_io_channel_unix_get_fd(handle), &so.sa, &addrlen); if (ret < 0) @@ -308,14 +308,14 @@ int net_transmit(GIOChannel *handle, const char *data, int len) int net_getsockname(GIOChannel *handle, IPADDR *addr, int *port) { union sockaddr_union so; - socklen_t len; + socklen_t addrlen; g_return_val_if_fail(handle != NULL, -1); g_return_val_if_fail(addr != NULL, -1); - len = SIZEOF_SOCKADDR(so); + addrlen = sizeof(so); if (getsockname(g_io_channel_unix_get_fd(handle), - (struct sockaddr *) &so, &len) == -1) + (struct sockaddr *) &so, &addrlen) == -1) return -1; sin_get_ip(&so, addr); |