diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-06-14 18:38:50 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-06-14 18:38:50 +0000 |
commit | c8cf0c1ce9cf1b38b302ae4a2a6fa798fef85f08 (patch) | |
tree | 9f73e3140dc8762a78b4972f921077f39c4b66b0 /src/iochannel.c | |
parent | edfad835cb7e4ab9f62de81cf4bf6b6ad9610b02 (diff) |
a bunch of fixes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@10 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/iochannel.c')
-rw-r--r-- | src/iochannel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/iochannel.c b/src/iochannel.c index aa7de714..2044d561 100644 --- a/src/iochannel.c +++ b/src/iochannel.c @@ -41,15 +41,15 @@ static void enable_mainloop_sources(struct iochannel *io) { static void callback(struct mainloop_source*s, int fd, enum mainloop_io_event events, void *userdata) { struct iochannel *io = userdata; - int changed; + int changed = 0; assert(s && fd >= 0 && userdata); - if (events & MAINLOOP_IO_EVENT_IN && !io->readable) { + if ((events & MAINLOOP_IO_EVENT_IN) && !io->readable) { io->readable = 1; changed = 1; } - if (events & MAINLOOP_IO_EVENT_OUT && !io->writable) { + if ((events & MAINLOOP_IO_EVENT_OUT) && !io->writable) { io->writable = 1; changed = 1; } @@ -116,7 +116,7 @@ void iochannel_free(struct iochannel*io) { if (io->input_source) mainloop_source_free(io->input_source); - if (io->output_source) + if (io->output_source && io->output_source != io->input_source) mainloop_source_free(io->output_source); free(io); |