1
0
mirror of https://github.com/irssi/irssi.git synced 2024-07-21 03:14:16 -04:00

when destroying channel, it really should be removed also from

server->channels list.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2829 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-05-28 20:36:42 +00:00 committed by cras
parent 700df91429
commit 6871f558b5
2 changed files with 6 additions and 4 deletions

View File

@ -77,8 +77,9 @@ void channel_destroy(CHANNEL_REC *channel)
channel->destroying = TRUE;
channels = g_slist_remove(channels, channel);
if (!channel->server->disconnected)
channel->server->channels = g_slist_remove(channel->server->channels, channel);
channel->server->channels =
g_slist_remove(channel->server->channels, channel);
signal_emit("channel destroyed", 1, channel);
MODULE_DATA_DEINIT(channel);

View File

@ -361,15 +361,16 @@ int server_start_connect(SERVER_REC *server)
static int server_remove_channels(SERVER_REC *server)
{
GSList *tmp;
GSList *tmp, *next;
int found;
g_return_val_if_fail(server != NULL, FALSE);
found = FALSE;
for (tmp = server->channels; tmp != NULL; tmp = tmp->next) {
for (tmp = server->channels; tmp != NULL; tmp = next) {
CHANNEL_REC *channel = tmp->data;
next = tmp->next;
channel_destroy(channel);
found = TRUE;
}