=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sndiod/midi.c,v retrieving revision 1.29 retrieving revision 1.30 diff -c -r1.29 -r1.30 *** src/usr.bin/sndiod/midi.c 2021/11/01 14:43:25 1.29 --- src/usr.bin/sndiod/midi.c 2024/05/03 05:18:09 1.30 *************** *** 1,4 **** ! /* $OpenBSD: midi.c,v 1.29 2021/11/01 14:43:25 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * --- 1,4 ---- ! /* $OpenBSD: midi.c,v 1.30 2024/05/03 05:18:09 ratchov Exp $ */ /* * Copyright (c) 2008-2012 Alexandre Ratchov * *************** *** 152,157 **** --- 152,174 ---- /* ep has empty buffer, so no need to call midi_tickets() */ peer->txmask |= ep->self; } + } + + /* + * return the list of endpoints the given one receives from + */ + unsigned int + midi_rxmask(struct midi *ep) + { + int i, rxmask; + + for (rxmask = 0, i = 0; i < MIDI_NEP; i++) { + if ((midi_ep[i].txmask & ep->self) == 0) + continue; + rxmask |= midi_ep[i].self; + } + + return rxmask; } /*