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

@ -238,9 +238,12 @@ static void sig_server_connecting(SERVER_REC *server, IPADDR *ip)
char ipaddr[MAX_IP_LEN];
g_return_if_fail(server != NULL);
g_return_if_fail(ip != NULL);
net_ip2host(ip, ipaddr);
if (ip == NULL)
ipaddr[0] = '\0';
else
net_ip2host(ip, ipaddr);
printformat(server, NULL, MSGLEVEL_CLIENTNOTICE, TXT_CONNECTING,
server->connrec->address, ipaddr, server->connrec->port);
}

View file

@ -610,6 +610,7 @@ void windows_init(void)
read_settings();
signal_add("server looking", (SIGNAL_FUNC) sig_server_looking);
signal_add("server connected", (SIGNAL_FUNC) sig_server_looking);
signal_add("server disconnected", (SIGNAL_FUNC) sig_server_disconnected);
signal_add("server connect failed", (SIGNAL_FUNC) sig_server_disconnected);
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
@ -621,6 +622,7 @@ void windows_deinit(void)
if (daycheck == 1) signal_remove("print text", (SIGNAL_FUNC) sig_print_text);
signal_remove("server looking", (SIGNAL_FUNC) sig_server_looking);
signal_remove("server connected", (SIGNAL_FUNC) sig_server_looking);
signal_remove("server disconnected", (SIGNAL_FUNC) sig_server_disconnected);
signal_remove("server connect failed", (SIGNAL_FUNC) sig_server_disconnected);
signal_remove("setup changed", (SIGNAL_FUNC) read_settings);