summaryrefslogtreecommitdiff
path: root/src/core/net-nonblock.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-05-19 14:43:16 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-05-19 14:43:16 +0000
commit6f7485b8fa6888d137243742cb31fa0848abe3ba (patch)
treefc8ad5d0a1df7d353ed70507a0cdced76696f84e /src/core/net-nonblock.c
parent7437bbea5fa8025374b4b127d4a6e4e67d75ab94 (diff)
downloadirssi-6f7485b8fa6888d137243742cb31fa0848abe3ba.zip
net_connect*() contains now error parameter, so it can be used to properly
check the errno if connect() fails. Added support for connecting to named UNIX sockets. Some cleanups with session handling / server connecting as well. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2819 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/net-nonblock.c')
-rw-r--r--src/core/net-nonblock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/net-nonblock.c b/src/core/net-nonblock.c
index 7392f429..cf0b9596 100644
--- a/src/core/net-nonblock.c
+++ b/src/core/net-nonblock.c
@@ -186,7 +186,8 @@ static void simple_readpipe(SIMPLE_THREAD_REC *rec, GIOChannel *pipe)
{
RESOLVED_IP_REC iprec;
GIOChannel *handle;
- IPADDR *ip;
+ IPADDR *ip;
+ int error;
g_return_if_fail(rec != NULL);
@@ -202,7 +203,7 @@ static void simple_readpipe(SIMPLE_THREAD_REC *rec, GIOChannel *pipe)
ip = iprec.ip4.family != 0 ? &iprec.ip4 : &iprec.ip6;
handle = iprec.error == -1 ? NULL :
- net_connect_ip(ip, rec->port, rec->my_ip);
+ net_connect_ip(ip, rec->port, rec->my_ip, &error);
g_free_not_null(rec->my_ip);