From 7ce7f3c30be37815a719776fce77c6c4b49e5e5b Mon Sep 17 00:00:00 2001 From: Albert Graef Date: Tue, 16 Oct 2018 08:29:22 +0200 Subject: [PATCH] Fix up the detection of our own ports in the connection callback. --- jackdriver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jackdriver.c b/jackdriver.c index 0cf44ae..7702b94 100644 --- a/jackdriver.c +++ b/jackdriver.c @@ -435,10 +435,10 @@ connect_callback(jack_port_id_t a, jack_port_id_t b, int yn, void *seqq) const char *aname = jack_port_name(ap); const char *bname = jack_port_name(bp); size_t l = strlen(seq->client_name); - if (!strncmp(seq->client_name, aname, l)) + if (jack_port_is_mine(seq->jack_client, ap)) printf("%-*s %s: %s\n", (int)l+10, aname, (yn ? "connected to" : "disconnected from"), bname); - else if (!strncmp(seq->client_name, bname, l)) + else if (jack_port_is_mine(seq->jack_client, bp)) printf("%-*s %s: %s\n", (int)l+10, bname, (yn ? "connected to" : "disconnected from"), aname); }