diff options
author | dequis <dx@dxzone.com.ar> | 2018-01-20 19:58:05 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2018-01-28 23:06:26 -0300 |
commit | a4f99ae746efb121185fe76c392a64d743a9eb92 (patch) | |
tree | d30d8178d1472f75fbde6a30927d910315e4e9f0 /src/fe-common/irc/fe-netjoin.c | |
parent | 243ae4be84d422322f20be1b715dc0b00ef9c32d (diff) | |
download | irssi-a4f99ae746efb121185fe76c392a64d743a9eb92.zip |
Revert more of the netsplit print optimisation to fix crashes
Now iterating over all servers to avoid crashes on server_ischannel(),
which is a macro for server->ischannel(), so it dies horribly when it's
null. Doesn't help that IS_IRC_SERVER() always returns true on null.
Diffstat (limited to 'src/fe-common/irc/fe-netjoin.c')
-rw-r--r-- | src/fe-common/irc/fe-netjoin.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/fe-common/irc/fe-netjoin.c b/src/fe-common/irc/fe-netjoin.c index bc39b27c..a7a2e4fe 100644 --- a/src/fe-common/irc/fe-netjoin.c +++ b/src/fe-common/irc/fe-netjoin.c @@ -245,20 +245,18 @@ static void print_netjoins(NETJOIN_SERVER_REC *server, const char *filter_channe message before it. */ static void sig_print_starting(TEXT_DEST_REC *dest) { - NETJOIN_SERVER_REC *rec; + GSList *tmp, *next; if (printing_joins) return; - if (!IS_IRC_SERVER(dest->server)) - return; - - if (!server_ischannel(dest->server, dest->target)) - return; + for (tmp = joinservers; tmp != NULL; tmp = next) { + NETJOIN_SERVER_REC *server = tmp->data; - rec = netjoin_find_server(IRC_SERVER(dest->server)); - if (rec != NULL && rec->netjoins != NULL) - print_netjoins(rec, NULL); + next = tmp->next; + if (server->netjoins != NULL) + print_netjoins(server, NULL); + } } static int sig_check_netjoins(void) |