From 2e78fb6c883286287ae514ff0d262a5584ecdd35 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 28 Jan 2020 15:59:14 -0700 Subject: do not attempt local (non-server-call) check on connections in jack_port_disconnect unless port is owned by caller --- libjack/client.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libjack/client.c b/libjack/client.c index ac619c6..b34766a 100644 --- a/libjack/client.c +++ b/libjack/client.c @@ -2662,15 +2662,19 @@ jack_port_disconnect (jack_client_t *client, jack_port_t *port) { jack_request_t req; - pthread_mutex_lock (&port->connection_lock); + if (port->shared->client_id == client->control->uuid) { + + pthread_mutex_lock (&port->connection_lock); + + if (port->connections == NULL) { + printf ("JACK port not connected\n"); + pthread_mutex_unlock (&port->connection_lock); + return 0; + } - if (port->connections == NULL) { pthread_mutex_unlock (&port->connection_lock); - return 0; } - pthread_mutex_unlock (&port->connection_lock); - VALGRIND_MEMSET (&req, 0, sizeof(req)); req.type = DisconnectPort; -- cgit v1.2.1