From 6c8c58ab4ee8323414a6d215c0790771a79b09b5 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sun, 7 Mar 2021 09:44:40 +0100 Subject: [PATCH] jack: also match system ports in get_ports Fixes #850 --- pipewire-jack/src/pipewire-jack.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c index f0ccf3693..fbcd1b2bf 100644 --- a/pipewire-jack/src/pipewire-jack.c +++ b/pipewire-jack/src/pipewire-jack.c @@ -4392,7 +4392,11 @@ const char ** jack_get_ports (jack_client_t *client, continue; if (port_name_pattern && port_name_pattern[0]) { - if (regexec(&port_regex, o->port.name, 0, NULL, 0) == REG_NOMATCH) + bool match; + match = regexec(&port_regex, o->port.name, 0, NULL, 0) == 0; + if (!match && is_port_default(c, o)) + match = regexec(&port_regex, o->port.system, 0, NULL, 0) == 0; + if (!match) continue; } if (type_name_pattern && type_name_pattern[0]) {