+ /* Channel links */
+ if (vt->channels[i].linked && !list_empty(&ch->channel_links)) {
+ struct dlist *ch_itr;
+ list_iterate(ch_itr, &ch->channel_links) {
+ channel_t *ch_link;
+ ch_link = list_get_entry(ch_itr, channel_t, link_node);
+ list_iterate(itr, &ch_link->clients) {
+ client_t *c;
+ c = list_get_entry(itr, client_t, chan_node);
+ Log_debug("Linked voice from %s -> %s", ch->name, ch_link->name);
+ Client_send_voice(client, c, buffer, pds->offset + 1, poslen);
+ }
+ }
+ }
+ /* children */
+ if (vt->channels[i].children) {
+ struct dlist chanlist, *ch_itr;
+ init_list_entry(&chanlist);
+ Chan_buildTreeList(ch, &chanlist);
+ list_iterate(ch_itr, &chanlist) {
+ channel_t *sub;
+ sub = list_get_entry(ch_itr, channellist_t, node)->chan;
+ list_iterate(itr, &sub->clients) {
+ client_t *c;
+ c = list_get_entry(itr, client_t, chan_node);
+ Log_debug("Child voice from %s -> %s", ch->name, sub->name);
+ Client_send_voice(client, c, buffer, pds->offset + 1, poslen);
+ }
+ }
+ Chan_freeTreeList(&chanlist);
+ }