From 25f673bfde1c316aa0c5af551f6c0aa601b53e51 Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Tue, 20 Oct 2020 22:02:21 +0100 Subject: [PATCH] um_callerid: Use newer common channel iteration --- modules/um_callerid.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/um_callerid.c b/modules/um_callerid.c index bfc94fd8..56394986 100644 --- a/modules/um_callerid.c +++ b/modules/um_callerid.c @@ -90,12 +90,13 @@ static const char um_callerid_desc[] = static bool has_common_channel(struct Client *source_p, struct Client *target_p) { - rb_dlink_node *ptr; + rb_dlink_node *ps, *pt; + struct membership *ms, *mt; + struct Channel *chptr; - RB_DLINK_FOREACH(ptr, source_p->user->channel.head) + ITER_COMM_CHANNELS(ps, pt, source_p->user->channel.head, target_p->user->channel.head, ms, mt, chptr) { - struct membership *msptr = ptr->data; - if (IsMember(target_p, msptr->chptr)) + if (ms != NULL && mt != NULL) return true; }