summaryrefslogtreecommitdiff
path: root/libjack/client.c
diff options
context:
space:
mode:
Diffstat (limited to 'libjack/client.c')
-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;