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.
This commit is contained in:
Wim Taymans 2020-11-19 12:37:10 +01:00
parent 6a244592a0
commit fb44d3428c

View file

@ -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;
}