From: Jilles Tjoelker Date: Sun, 1 Mar 2015 13:53:40 +0000 (+0100) Subject: send: sendto_local_clients_with_capability() needn't use serial X-Git-Url: https://jfr.im/git/solanum.git/commitdiff_plain/bed692ca0eee98dca009b8d109448e788d3db8a2 send: sendto_local_clients_with_capability() needn't use serial sendto_local_clients_with_capability() sends to a subset of the list of local clients and cannot visit the same client multiple times like sendto_channel_flags() and sendto_common_channels_local() can. --- diff --git a/src/send.c b/src/send.c index cbc4575f..cc169f1b 100644 --- a/src/send.c +++ b/src/send.c @@ -1041,18 +1041,13 @@ sendto_local_clients_with_capability(int cap, const char *pattern, ...) rb_linebuf_putmsg(&linebuf, pattern, &args, NULL); va_end(args); - current_serial++; - RB_DLINK_FOREACH(ptr, lclient_list.head) { target_p = ptr->data; - if(IsIOError(target_p) || - target_p->serial == current_serial || - !IsCapable(target_p, cap)) + if(IsIOError(target_p) || !IsCapable(target_p, cap)) continue; - target_p->serial = current_serial; send_linebuf(target_p, &linebuf); }