diff options
author | torben <torben@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2011-05-29 00:47:16 +0000 |
---|---|---|
committer | torben <torben@0c269be4-1314-0410-8aa9-9f06e86f4224> | 2011-05-29 00:47:16 +0000 |
commit | 009ebad4af1b16d282f95b1b6fb999f674cccf8c (patch) | |
tree | 6b726d64fbaaceb28d1ecb90f1914e01e5804927 /jackd/engine.c | |
parent | e726e6a74665062276ab96a2cf0d33a670c19ada (diff) | |
download | jack1-009ebad4af1b16d282f95b1b6fb999f674cccf8c.tar.gz |
[engine] make jack_check_clients return errs. when no err, read graph_wait
if jack_check_clients does not find a bad client, we need to read
the graph_wait_fd. otherwise we end up with too many execution tokens
floating around.
this commit also fixes the reset of the continuous stream
and makes the mercysleep use ms instead of ns.
git-svn-id: svn+ssh://jackaudio.org/trunk/jack@4430 0c269be4-1314-0410-8aa9-9f06e86f4224
Diffstat (limited to 'jackd/engine.c')
-rw-r--r-- | jackd/engine.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/jackd/engine.c b/jackd/engine.c index 1866f62..36e896f 100644 --- a/jackd/engine.c +++ b/jackd/engine.c @@ -799,23 +799,25 @@ jack_process_external(jack_engine_t *engine, JSList *node) ctl->finished_at? (ctl->finished_at - ctl->signalled_at): 0); - jack_check_clients (engine, 1); - - engine->process_errors++; - return NULL; /* will stop the loop */ + if (jack_check_clients (engine, 1)) { + engine->process_errors++; + return NULL; /* will stop the loop */ + } } else { + engine->continuous_stream = 0; + } - DEBUG ("reading byte from subgraph_wait_fd==%d", - client->subgraph_wait_fd); - 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++; - return NULL; /* will stop the loop */ - } + DEBUG ("reading byte from subgraph_wait_fd==%d", + client->subgraph_wait_fd); + + 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++; + return NULL; /* will stop the loop */ } /* Move to next internal client (or end of client list) */ @@ -2445,7 +2447,6 @@ jack_run_one_cycle (jack_engine_t *engine, jack_nframes_t nframes, DEBUG("run process\n"); if (jack_engine_process (engine, nframes) != 0) { - engine->continuous_stream = 0; DEBUG ("engine process cycle failed"); jack_check_client_status (engine); } |