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:
Lennart Poettering 2007-10-28 16:35:09 +00:00
parent daa2863daf
commit b718d18a23
2 changed files with 22 additions and 23 deletions

View file

@ -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);
}

View file

@ -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;
}