From: Lennart Poettering Date: Sat, 20 May 2006 15:00:16 +0000 (+0000) Subject: fix long-standing buf that could cause polypaudio to eat 100% CPU: fix handling of... X-Git-Tag: submit/2.0-panda/20130828.192557~3655 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=13329d36dfb5950c5917ab4b6d0939e7ae1100a0;p=profile%2Fivi%2Fpulseaudio-panda.git 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 --- diff --git a/src/polypcore/iochannel.c b/src/polypcore/iochannel.c index b953a1d..10997d6 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); } }