um_callerid: Use newer common channel iteration

This commit is contained in:
Ed Kellett 2020-10-20 22:02:21 +01:00
parent b9b28600d7
commit 25f673bfde
1 changed files with 5 additions and 4 deletions

View File

@ -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;
}