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
This commit is contained in:
Timo Sirainen 2002-05-19 14:43:16 +00:00 committed by cras
commit 6f7485b8fa
13 changed files with 180 additions and 92 deletions

View file

@ -69,7 +69,7 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr,
g_hash_table_lookup(optlist, proto->chatnet);
conn = server_create_conn(proto != NULL ? proto->id : -1, addr,
atoi(portstr), chatnet, password, nick);
if (proto == NULL)
if (proto == NULL)
proto = chat_protocol_find_id(conn->chat_type);
if (proto->not_initialized) {
@ -80,6 +80,9 @@ static SERVER_CONNECT_REC *get_server_connect(const char *data, int *plus_addr,
return NULL;
}
if (strchr(addr, '/') != NULL)
conn->unix_socket = TRUE;
if (g_hash_table_lookup(optlist, "6") != NULL)
conn->family = AF_INET6;
else if (g_hash_table_lookup(optlist, "4") != NULL)