]> git.alsa-project.org Git - alsa-utils.git/commitdiff
fix poll timeout
authorClemens Ladisch <clemens@ladisch.de>
Thu, 21 Feb 2008 08:12:27 +0000 (09:12 +0100)
committerClemens Ladisch <clemens@ladisch.de>
Thu, 21 Feb 2008 08:12:27 +0000 (09:12 +0100)
Use an infinite poll timeout to prevent unnecessary wakeups.

seq/aplaymidi/arecordmidi.c
seq/aseqdump/aseqdump.c

index 243ec5637166a2e56e143407c1f465d747d15a08..558fd6d968c2a27ae6e8ae568193b5e290b2a3b4 100644 (file)
@@ -857,7 +857,7 @@ int main(int argc, char *argv[])
        pfds = alloca(sizeof(*pfds) * npfds);
        for (;;) {
                snd_seq_poll_descriptors(seq, pfds, npfds, POLLIN);
-               if (poll(pfds, npfds, 69) < 0)
+               if (poll(pfds, npfds, -1) < 0)
                        break;
                do {
                        snd_seq_event_t *event;
index c720c5f2990bb0259bb006454f62d6ad81d6aefd..1cf210da8989ed8858cd3ed3742e6d9d2a87a2a4 100644 (file)
@@ -418,7 +418,7 @@ int main(int argc, char *argv[])
        pfds = alloca(sizeof(*pfds) * npfds);
        for (;;) {
                snd_seq_poll_descriptors(seq, pfds, npfds, POLLIN);
-               if (poll(pfds, npfds, 69) < 0)
+               if (poll(pfds, npfds, -1) < 0)
                        break;
                do {
                        snd_seq_event_t *event;