mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
core, modules: Remove useless EINTR tests
Since commit ad447d1468 (in 2009) pa_read and pa_write take care of
handling EINTR error.
So, pa_read, pa_write, pa_iochannel_read and pa_iochannel_write can not
exit with errno set to EINTR, and testing it is useless.
This commit is contained in:
parent
8342c12339
commit
05f3e8bf9a
10 changed files with 31 additions and 82 deletions
|
|
@ -199,14 +199,13 @@ static ssize_t pipe_sink_write(struct userdata *u, pa_memchunk *pchunk) {
|
|||
if (l < 0) {
|
||||
if (errno == EAGAIN)
|
||||
break;
|
||||
else if (errno != EINTR) {
|
||||
if (!u->fifo_error) {
|
||||
pa_log("Failed to write data to FIFO: %s", pa_cstrerror(errno));
|
||||
u->fifo_error = true;
|
||||
}
|
||||
count = -1 - count;
|
||||
break;
|
||||
|
||||
if (!u->fifo_error) {
|
||||
pa_log("Failed to write data to FIFO: %s", pa_cstrerror(errno));
|
||||
u->fifo_error = true;
|
||||
}
|
||||
count = -1 - count;
|
||||
break;
|
||||
} else {
|
||||
if (u->fifo_error) {
|
||||
pa_log_debug("Recovered from FIFO error");
|
||||
|
|
@ -288,9 +287,7 @@ static int process_render(struct userdata *u) {
|
|||
|
||||
if (l < 0) {
|
||||
|
||||
if (errno == EINTR)
|
||||
continue;
|
||||
else if (errno == EAGAIN)
|
||||
if (errno == EAGAIN)
|
||||
return 0;
|
||||
else {
|
||||
pa_log("Failed to write data to FIFO: %s", pa_cstrerror(errno));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue