1
0
mirror of https://github.com/irssi/irssi.git synced 2025-01-03 14:56:47 -05:00

Apply patch from bug #202 (from "Irssi Fan"); when calling

reconnect_save_status() for a server that has not sent 001
yet, do not free and reallocate conn->channels twice, and do
not copy the channels if server->connrec->no_autojoin_channels
is set. It seems a special case because reconnect_save_status()
is not usually called for servers that have not sent 001
yet, but it can't really hurt.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4532 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Jilles Tjoelker 2007-05-30 21:18:22 +00:00 committed by jilles
parent b05e103ad9
commit 1f009670a1

View File

@ -48,12 +48,11 @@ void reconnect_save_status(SERVER_CONNECT_REC *conn, SERVER_REC *server)
if (!server->connected) {
/* default to channels/usermode from connect record
since server isn't fully connected yet */
/* XXX when is reconnect_save_status() called with
* server->connected==FALSE? */
g_free_not_null(conn->channels);
conn->channels = server->connrec->no_autojoin_channels ? NULL :
g_strdup(server->connrec->channels);
g_free_not_null(conn->channels);
conn->channels = g_strdup(server->connrec->channels);
}
signal_emit("server reconnect save status", 2, conn, server);