From fb44d3428c507f2ab9ea3eb6fd28936993bc39b7 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 19 Nov 2020 12:37:10 +0100 Subject: [PATCH] jack: block some cases Refuse to run when we run in the daemon, we can't really do a blocking connect to the daemon from its main thread. Also refuse to run when we detect an old pipewire libaray. Blocks the case where some app linked against 0.2 wants to use the replacement libjack.so. --- pipewire-jack/src/pipewire-jack.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pipewire-jack/src/pipewire-jack.c b/pipewire-jack/src/pipewire-jack.c index 72a11b3be..54c8c8dbd 100644 --- a/pipewire-jack/src/pipewire-jack.c +++ b/pipewire-jack/src/pipewire-jack.c @@ -2373,7 +2373,9 @@ jack_client_t * jack_client_open (const char *client_name, struct spa_node_info ni; va_list ap; - if (getenv("PIPEWIRE_NOJACK") != NULL) + if (getenv("PIPEWIRE_NOJACK") != NULL || + getenv("PIPEWIRE_INTERNAL") != NULL || + strstr(pw_get_library_version(), "0.2") != NULL) goto disabled; spa_return_val_if_fail(client_name != NULL, NULL); @@ -2545,7 +2547,7 @@ exit: return NULL; disabled: if (status) - *status = JackFailure | JackServerFailed; + *status = JackFailure | JackInitFailure; return NULL; }