summaryrefslogtreecommitdiff
path: root/apps/midi.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-10 17:49:17 +0200
committerChristian Pointner <equinox@spreadspace.org>2015-10-10 17:49:17 +0200
commit3201a1ddb17ddac985fd06800628b0b54fc0a692 (patch)
treea9228d277bee909bc1b4151058253c6eae15606e /apps/midi.c
parentgot rid of threads entirely (diff)
improved poll() handling
Diffstat (limited to 'apps/midi.c')
-rw-r--r--apps/midi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/midi.c b/apps/midi.c
index 821f353..77a6de6 100644
--- a/apps/midi.c
+++ b/apps/midi.c
@@ -61,8 +61,8 @@ int midi_handle_revents(midi_t* m, struct pollfd *pfds, int npfds)
error(0, 0, "MIDI: cannot get poll events: %s", snd_strerror(errno));
return -1;
}
- if(revents & (POLLERR | POLLHUP)) {
- error(0, 0, "MIDI: got POLLERR or POLLHUP");
+ if(pfds[0].revents & (POLLERR | POLLHUP | POLLNVAL)) {
+ error(0, 0, "MIDI: got POLLERR, POLLHUP or POLLNVAL");
return -1;
}
if(!(revents & POLLIN))