diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-11 11:04:46 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-10-11 11:04:46 -0400 |
commit | 905372e4b715c98980160162bec982dfc423fff8 (patch) | |
tree | 0044442c6ad6518f91e736141eb615d1a9174cc4 /jackd | |
parent | 91d2d75832d52d06e8f677483af643712fd0273a (diff) | |
download | jack1-905372e4b715c98980160162bec982dfc423fff8.tar.gz |
use max (JACK_CLIENT_EVENT_TIMEOUT,command-line-client-timeout) for poll on event handling when in non-RT mode; tidy up error messages when something goes wrong with client event handling
Diffstat (limited to 'jackd')
-rw-r--r-- | jackd/engine.c | 33 |
1 files changed, 27 insertions, 6 deletions
diff --git a/jackd/engine.c b/jackd/engine.c index 123e1b7..15d2016 100644 --- a/jackd/engine.c +++ b/jackd/engine.c @@ -3056,6 +3056,15 @@ jack_deliver_event (jack_engine_t *engine, jack_client_internal_t *client, jack_time_t then = jack_get_microseconds (); jack_time_t now; + /* if we're not running realtime and there is a client timeout set + that exceeds the default client event timeout (which is not + bound by RT limits, then use the larger timeout. + */ + + if (!engine->control->real_time && (engine->client_timeout_msecs > poll_timeout)) { + poll_timeout = engine->client_timeout_msecs; + } + #ifdef __linux again: #endif @@ -3116,7 +3125,7 @@ jack_deliver_event (jack_engine_t *engine, jack_client_internal_t *client, } } } - + if (status == 0) { if (read (client->event_fd, &status, sizeof (status)) != sizeof (status)) { jack_error ("cannot read event response from " @@ -3127,11 +3136,23 @@ jack_deliver_event (jack_engine_t *engine, jack_client_internal_t *client, } } else { - jack_error ("bad status (%d) for client %s " - "handling event (type = %d)", - status, - client->control->name, - event->type); + switch (status) { + case -1: + jack_error ("internal poll failure reading response from client %s to a %s event", + client->control->name, + jack_event_type_name (event->type)); + break; + case -2: + jack_error ("timeout waiting for client %s to handle a %s event", + client->control->name, + jack_event_type_name (event->type)); + break; + default: + jack_error ("bad status (%d) from client %s while handling a %s event", + (int) status, + client->control->name, + jack_event_type_name (event->type)); + } } if (status<0) { |