mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-06 13:29:56 -05:00
fix error handling
git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/lennart@1965 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
daa2863daf
commit
b718d18a23
2 changed files with 22 additions and 23 deletions
|
|
@ -185,7 +185,7 @@ static int do_read(connection *c) {
|
|||
|
||||
if (r <= 0) {
|
||||
|
||||
if (errno == EINTR || errno == EAGAIN)
|
||||
if (r < 0 && (errno == EINTR || errno == EAGAIN))
|
||||
return 0;
|
||||
|
||||
pa_log_debug("read(): %s", r == 0 ? "EOF" : pa_cstrerror(errno));
|
||||
|
|
@ -634,4 +634,3 @@ void pa_protocol_simple_free(pa_protocol_simple *p) {
|
|||
|
||||
pa_xfree(p);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ static void do_call(pa_socket_client *c) {
|
|||
}
|
||||
|
||||
if (error != 0) {
|
||||
pa_log_debug("connect(): %s", pa_cstrerror(errno));
|
||||
pa_log_debug("connect(): %s", pa_cstrerror(error));
|
||||
errno = error;
|
||||
goto finish;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue