From 35f1cc8dbd7506f3ab9504352dcf51266641e06e Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 12 May 2008 13:19:18 +0000 Subject: [PATCH] make clients call jack_messagebuffer_init() and jack_messagebuffer_exit() git-svn-id: svn+ssh://jackaudio.org/trunk/jack@1184 0c269be4-1314-0410-8aa9-9f06e86f4224 --- jackd/engine.c | 4 ++-- libjack/client.c | 13 ++++++++----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/jackd/engine.c b/jackd/engine.c index a97b7ad..1bd0145 100644 --- a/jackd/engine.c +++ b/jackd/engine.c @@ -676,8 +676,8 @@ jack_process_external(jack_engine_t *engine, JSList *node) pfd[0].fd = client->subgraph_wait_fd; pfd[0].events = POLLERR|POLLIN|POLLHUP|POLLNVAL; - DEBUG ("waiting on fd==%d for process() subgraph to finish", - client->subgraph_wait_fd); + DEBUG ("waiting on fd==%d for process() subgraph to finish (timeout = %d, period_usecs = %d)", + client->subgraph_wait_fd, poll_timeout, engine->driver->period_usecs); if (poll (pfd, 1, poll_timeout) < 0) { jack_error ("poll on subgraph processing failed (%s)", diff --git a/libjack/client.c b/libjack/client.c index 80a463a..15dbffa 100644 --- a/libjack/client.c +++ b/libjack/client.c @@ -952,6 +952,8 @@ jack_client_open_aux (const char *client_name, jack_port_type_id_t ptid; jack_status_t my_status; + jack_messagebuffer_init (); + if (status == NULL) /* no status from caller? */ status = &my_status; /* use local status word */ *status = 0; @@ -1099,10 +1101,10 @@ jack_client_open_aux (const char *client_name, jack_client_t* jack_client_open(const char* ext_client_name, jack_options_t options, jack_status_t* status, ...) { va_list ap; - va_start(ap, status); - jack_client_t* res = jack_client_open_aux(ext_client_name, options, status, ap); - va_end(ap); - return res; + va_start(ap, status); + jack_client_t* res = jack_client_open_aux(ext_client_name, options, status, ap); + va_end(ap); + return res; } jack_client_t * @@ -1201,7 +1203,7 @@ jack_internal_client_close (const char *client_name) jack_error ("cannot deliver ClientUnload request to JACK " "server."); } - + /* no response to this request */ close (fd); @@ -2095,6 +2097,7 @@ jack_client_close_aux (jack_client_t *client) } jack_slist_free (client->ports_ext); jack_client_free (client); + jack_messagebuffer_exit (); return rc; }