mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
Fix module-oss for devices that return EAGAIN when we don't expect it. (Closes #66)
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1442 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
01ddb54889
commit
312c326def
1 changed files with 10 additions and 3 deletions
|
|
@ -169,10 +169,14 @@ static void do_write(struct userdata *u) {
|
||||||
assert(memchunk->length);
|
assert(memchunk->length);
|
||||||
|
|
||||||
if ((r = pa_iochannel_write(u->io, (uint8_t*) memchunk->memblock->data + memchunk->index, memchunk->length)) < 0) {
|
if ((r = pa_iochannel_write(u->io, (uint8_t*) memchunk->memblock->data + memchunk->index, memchunk->length)) < 0) {
|
||||||
pa_log("write() failed: %s", pa_cstrerror(errno));
|
|
||||||
|
|
||||||
clear_up(u);
|
if (errno != EAGAIN) {
|
||||||
pa_module_unload_request(u->module);
|
pa_log("write() failed: %s", pa_cstrerror(errno));
|
||||||
|
|
||||||
|
clear_up(u);
|
||||||
|
pa_module_unload_request(u->module);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -224,11 +228,14 @@ static void do_read(struct userdata *u) {
|
||||||
assert(memchunk.memblock);
|
assert(memchunk.memblock);
|
||||||
if ((r = pa_iochannel_read(u->io, memchunk.memblock->data, memchunk.memblock->length)) < 0) {
|
if ((r = pa_iochannel_read(u->io, memchunk.memblock->data, memchunk.memblock->length)) < 0) {
|
||||||
pa_memblock_unref(memchunk.memblock);
|
pa_memblock_unref(memchunk.memblock);
|
||||||
|
|
||||||
if (errno != EAGAIN) {
|
if (errno != EAGAIN) {
|
||||||
pa_log("read() failed: %s", pa_cstrerror(errno));
|
pa_log("read() failed: %s", pa_cstrerror(errno));
|
||||||
|
|
||||||
clear_up(u);
|
clear_up(u);
|
||||||
pa_module_unload_request(u->module);
|
pa_module_unload_request(u->module);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue