summaryrefslogtreecommitdiff
path: root/src/fe-common
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/fe-common
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/fe-common')
-rw-r--r--src/fe-common/core/fe-server.c7
-rw-r--r--src/fe-common/core/fe-windows.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/fe-common/core/fe-server.c b/src/fe-common/core/fe-server.c
index d8f9d137..db068f3b 100644
--- a/src/fe-common/core/fe-server.c
+++ b/src/fe-common/core/fe-server.c
@@ -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);
}
diff --git a/src/fe-common/core/fe-windows.c b/src/fe-common/core/fe-windows.c
index 4ac94c5f..bfedcaad 100644
--- a/src/fe-common/core/fe-windows.c
+++ b/src/fe-common/core/fe-windows.c
@@ -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);