diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2018-02-05 22:26:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-05 22:26:32 +0100 |
commit | cfcc021c81eea84bd982a64764f62e163128acf3 (patch) | |
tree | c008d1b102b054499afd0cc13162c67efdd3c06d /src/fe-common | |
parent | 3c1bc5f9162c90aa247d024422699710419658f6 (diff) | |
parent | a4f99ae746efb121185fe76c392a64d743a9eb92 (diff) | |
download | irssi-cfcc021c81eea84bd982a64764f62e163128acf3.zip |
Merge pull request #824 from dequis/more-netsplit-revert
Revert more of the netsplit print optimisation to fix crashes
Diffstat (limited to 'src/fe-common')
-rw-r--r-- | src/fe-common/irc/fe-netjoin.c | 16 | ||||
-rw-r--r-- | src/fe-common/irc/fe-netsplit.c | 15 |
2 files changed, 13 insertions, 18 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) diff --git a/src/fe-common/irc/fe-netsplit.c b/src/fe-common/irc/fe-netsplit.c index ac3330e5..edd3fc34 100644 --- a/src/fe-common/irc/fe-netsplit.c +++ b/src/fe-common/irc/fe-netsplit.c @@ -247,20 +247,17 @@ static int check_server_splits(IRC_SERVER_REC *server) message before it. */ static void sig_print_starting(TEXT_DEST_REC *dest) { - IRC_SERVER_REC *rec; + GSList *tmp; if (printing_splits) return; - if (!IS_IRC_SERVER(dest->server)) - return; - - if (!server_ischannel(dest->server, dest->target)) - return; + for (tmp = servers; tmp != NULL; tmp = tmp->next) { + IRC_SERVER_REC *rec = tmp->data; - rec = IRC_SERVER(dest->server); - if (rec->split_servers != NULL) - print_splits(rec, NULL); + if (IS_IRC_SERVER(rec) && rec->split_servers != NULL) + print_splits(rec, NULL); + } } static int sig_check_splits(void) |