summaryrefslogtreecommitdiff
path: root/jackd
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-10-23 15:33:00 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-10-23 15:33:00 -0400
commit829c189d82f923cdb7cf1fa05d9e099bd14d0055 (patch)
treef1a17ff46e68a1d07956dd8356bbf4ea89e95c43 /jackd
parent5b169c105077981eb27245d2babe2f4d6d24473f (diff)
downloadjack1-829c189d82f923cdb7cf1fa05d9e099bd14d0055.tar.gz
fix arguably incorrect marking of client with errors after process cycle fails to return to server
When reading the byte from the wait file descriptor failed, jack would mark the client at the head of the external client chain with an error. But the fault may not have been with that client. So now if the read error is EAGAIN ('no data available') do not mark the client, but rely on other mechanisms to detect too-slow or dead clients. Also tweak VERBOSE output a little in some related spots.
Diffstat (limited to 'jackd')
-rw-r--r--jackd/clientengine.c1
-rw-r--r--jackd/engine.c15
2 files changed, 11 insertions, 5 deletions
diff --git a/jackd/clientengine.c b/jackd/clientengine.c
index df2f5f1..5e5e1ae 100644
--- a/jackd/clientengine.c
+++ b/jackd/clientengine.c
@@ -275,6 +275,7 @@ jack_check_clients (jack_engine_t* engine, int with_timeout_check)
client = (jack_client_internal_t *) node->data;
if (client->error) {
+ VERBOSE (engine, "client %s already marked with error = %d\n", client->control->name, client->error);
errs++;
continue;
}
diff --git a/jackd/engine.c b/jackd/engine.c
index b0499ac..3818b17 100644
--- a/jackd/engine.c
+++ b/jackd/engine.c
@@ -810,9 +810,14 @@ jack_process_external(jack_engine_t *engine, JSList *node)
if (read (client->subgraph_wait_fd, &c, sizeof(c))
!= sizeof (c)) {
- jack_error ("pp: cannot clean up byte from graph wait "
- "fd (%s)", strerror (errno));
- client->error++;
+ if (errno == EAGAIN) {
+ jack_error ("pp: cannot clean up byte from graph wait "
+ "fd (%s) - no data present");
+ } else {
+ jack_error ("pp: cannot clean up byte from graph wait "
+ "fd (%s)", strerror (errno));
+ client->error++;
+ }
return NULL; /* will stop the loop */
}
@@ -1624,10 +1629,10 @@ jack_server_thread (void *arg)
}
if (engine->pfd[i].revents & ~POLLIN) {
-
+
jack_mark_client_socket_error (engine, engine->pfd[i].fd);
jack_engine_signal_problems (engine);
-
+ VERBOSE (engine, "non-POLLIN events on fd %d", engine->pfd[i].fd);
} else if (engine->pfd[i].revents & POLLIN) {
if (handle_external_client_request (engine, engine->pfd[i].fd)) {