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

Don't shadow the 'channel' variable when printing the netjoins.

This is the root cause of #567
This commit is contained in:
LemonBoy 2016-11-23 22:22:37 +01:00
parent 7574bed26c
commit 5f0e755a00
2 changed files with 7 additions and 4 deletions

View File

@ -164,7 +164,7 @@ static void print_channel_netjoins(char *channel, TEMP_PRINT_REC *rec,
g_free(channel);
}
static void print_netjoins(NETJOIN_SERVER_REC *server, const char *channel)
static void print_netjoins(NETJOIN_SERVER_REC *server, const char *filter_channel)
{
TEMP_PRINT_REC *temp;
GHashTable *channels;
@ -189,7 +189,9 @@ static void print_netjoins(NETJOIN_SERVER_REC *server, const char *channel)
next2 = g_slist_next(tmp2);
if (channel != NULL && strcasecmp(realchannel, channel) != 0)
/* Filter the results by channel if asked to do so */
if (filter_channel != NULL &&
strcasecmp(realchannel, filter_channel) != 0)
continue;
temp = g_hash_table_lookup(channels, realchannel);

View File

@ -142,7 +142,7 @@ static void get_server_splits(void *key, NETSPLIT_REC *split,
}
}
static void print_server_splits(IRC_SERVER_REC *server, TEMP_SPLIT_REC *rec, const char *channel)
static void print_server_splits(IRC_SERVER_REC *server, TEMP_SPLIT_REC *rec, const char *filter_channel)
{
GString *destservers;
char *sourceserver;
@ -168,7 +168,8 @@ static void print_server_splits(IRC_SERVER_REC *server, TEMP_SPLIT_REC *rec, con
for (tmp = rec->channels; tmp != NULL; tmp = tmp->next) {
TEMP_SPLIT_CHAN_REC *chan = tmp->data;
if (channel != NULL && strcasecmp(channel, chan->name) != 0)
if (filter_channel != NULL &&
strcasecmp(chan->name, filter_channel) != 0)
continue;
g_string_truncate(chan->nicks, chan->nicks->len-2);