mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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:
parent
700df91429
commit
6871f558b5
@ -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);
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user