diff options
author | Jilles Tjoelker <jilles@irssi.org> | 2007-05-30 21:18:22 +0000 |
---|---|---|
committer | jilles <jilles@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2007-05-30 21:18:22 +0000 |
commit | 1f009670a17c0674709eea648d5b7f8c7cf16b2e (patch) | |
tree | f04ef503fe11e43ffca6804722a62a6031b4ba97 /src/core/servers-reconnect.c | |
parent | b05e103ad9a3895cf03ccfadf8cf1cf0a0e739e4 (diff) | |
download | irssi-1f009670a17c0674709eea648d5b7f8c7cf16b2e.zip |
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
Diffstat (limited to 'src/core/servers-reconnect.c')
-rw-r--r-- | src/core/servers-reconnect.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/servers-reconnect.c b/src/core/servers-reconnect.c index 1292f8e0..87bcf568 100644 --- a/src/core/servers-reconnect.c +++ b/src/core/servers-reconnect.c @@ -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); |