mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
a bunch of fixes
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@10 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
edfad835cb
commit
c8cf0c1ce9
8 changed files with 28 additions and 21 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue