]> code.delx.au - pulseaudio/blobdiff - src/polypcore/iochannel.c
fix long-standing buf that could cause polypaudio to eat 100% CPU: fix handling of...
[pulseaudio] / src / polypcore / iochannel.c
index b953a1d08f70fd286d9a1257155e9a7d0d395156..10997d6239aa6a8ae188357a8e8e071bed039a34 100644 (file)
@@ -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);
     }
 }