From 13329d36dfb5950c5917ab4b6d0939e7ae1100a0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sat, 20 May 2006 15:00:16 +0000 Subject: 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 --- src/polypcore/iochannel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/polypcore/iochannel.c b/src/polypcore/iochannel.c index b953a1d0..10997d62 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); } } -- cgit