From 1129bb8a7b12377fc7760a0c5771ad0a7ec43679 Mon Sep 17 00:00:00 2001 From: Alexandre Ratchov Date: Thu, 9 May 2013 17:12:13 +0200 Subject: [PATCH] Fix a typo in the condition to check if a midi port is referenced, causing the port to be closed prematurely --- sndiod/midi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sndiod/midi.c b/sndiod/midi.c index 42a5ca9..401eea8 100644 --- a/sndiod/midi.c +++ b/sndiod/midi.c @@ -512,7 +512,7 @@ port_unref(struct port *c) #endif for (rxmask = 0, i = 0; i < MIDI_NEP; i++) rxmask |= midi_ep[i].txmask; - if ((rxmask & c->midi->self) == 0 && c->state == PORT_INIT && !c->hold) + if ((rxmask & ~c->midi->self) == 0 && c->state == PORT_INIT && !c->hold) port_drain(c); }