+ return ch;
+}
+
+channel_t *Chan_iterate_siblings(channel_t *parent, channel_t **channelpptr)
+{
+ channel_t *ch = *channelpptr;
+
+ if (!list_empty(&parent->subs)) {
+ if (ch == NULL)
+ ch = list_get_entry(list_get_first(&parent->subs), channel_t, node);
+ else {
+ if (list_get_next(&ch->node) == &parent->subs)
+ ch = NULL;
+ else
+ ch = list_get_entry(list_get_next(&ch->node), channel_t, node);
+ }
+ }
+
+ *channelpptr = ch;
+ return ch;