summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-01-28 15:59:14 -0700
committerFilipe Coelho <falktx@falktx.com>2020-01-28 23:14:42 +0000
commit2e78fb6c883286287ae514ff0d262a5584ecdd35 (patch)
tree7330d82c2c4a9e1cb3beac36e6a306f995edfb93
parentca37b41df3a36f22931d3a9100b98f343ddc30f8 (diff)
downloadjack1-2e78fb6c883286287ae514ff0d262a5584ecdd35.tar.gz
do not attempt local (non-server-call) check on connections in jack_port_disconnect unless port is owned by caller
-rw-r--r--libjack/client.c14
1 files 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;