diff options
author | Lennart Poettering <lennart@poettering.net> | 2006-05-20 15:00:16 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2006-05-20 15:00:16 +0000 |
commit | 13329d36dfb5950c5917ab4b6d0939e7ae1100a0 (patch) | |
tree | 579b975847bc1ddfa89c79e46cb690ab694f62c3 | |
parent | cc61b57a325ee688b74ca2cbd5e281e7f76b71c0 (diff) |
fix long-standing buf that could cause polypaudio to eat 100% CPU: fix handling of event bits for pa_iochannel
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@940 fefdeb5f-60dc-0310-8127-8f9354f1896f
-rw-r--r-- | src/polypcore/iochannel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/polypcore/iochannel.c b/src/polypcore/iochannel.c index b953a1d08..10997d623 100644 --- a/src/polypcore/iochannel.c +++ b/src/polypcore/iochannel.c @@ -69,17 +69,17 @@ static void enable_mainloop_sources(pa_iochannel *io) { pa_io_event_flags_t f = PA_IO_EVENT_NULL; assert(io->input_event); - if (!pa_iochannel_is_readable(io)) + if (!io->readable) f |= PA_IO_EVENT_INPUT; - if (!pa_iochannel_is_writable(io)) + if (!io->writable) f |= PA_IO_EVENT_OUTPUT; io->mainloop->io_enable(io->input_event, f); } else { if (io->input_event) - io->mainloop->io_enable(io->input_event, pa_iochannel_is_readable(io) ? PA_IO_EVENT_NULL : PA_IO_EVENT_INPUT); + io->mainloop->io_enable(io->input_event, io->readable ? PA_IO_EVENT_NULL : PA_IO_EVENT_INPUT); if (io->output_event) - io->mainloop->io_enable(io->output_event, pa_iochannel_is_writable(io) ? PA_IO_EVENT_NULL : PA_IO_EVENT_OUTPUT); + io->mainloop->io_enable(io->output_event, io->writable ? PA_IO_EVENT_NULL : PA_IO_EVENT_OUTPUT); } } |