1
0
mirror of https://github.com/irssi/irssi.git synced 2024-11-03 04:27:19 -05:00

/UPGRADE: when trying to restore connection to server of which chat

protocol is unknown, close the specified handle.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2148 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-11-25 17:03:00 +00:00 committed by cras
parent 9db0c7cc7d
commit c3429fa50e

View File

@ -184,7 +184,7 @@ static void session_save_server(SERVER_REC *server, CONFIG_REC *config,
signal_emit("session save server", 3, server, config, node);
/* fake the server disconnection */
g_io_channel_unref(net_sendbuffer_handle(server->handle));
g_io_channel_unref(net_sendbuffer_handle(server->handle));
net_sendbuffer_destroy(server->handle, FALSE);
server->handle = NULL;
@ -257,8 +257,10 @@ static void session_restore_server(CONFIG_NODE *node)
return;
proto = chat_protocol_find(chat_type);
if (proto == NULL || proto->not_initialized)
if (proto == NULL || proto->not_initialized) {
if (handle < 0) close(handle);
return;
}
conn = server_create_conn(proto->id, address, port,
chatnet, password, nick);