tools: connect to the manager socket by default

This gives the tools unrestricted access by default if access.socket is defined
in the configuration access module.
This commit is contained in:
Julian Bouzas 2026-04-07 11:39:36 -04:00 committed by Wim Taymans
parent b12b7f785e
commit 14b74962d6
9 changed files with 56 additions and 15 deletions

View file

@ -1025,6 +1025,7 @@ static int get_data_from_pipewire(struct data *data, const char *opt_remote)
{
struct pw_loop *l;
struct global *g;
const char *remote_name;
data->loop = pw_main_loop_new(NULL);
if (data->loop == NULL) {
@ -1043,9 +1044,13 @@ static int get_data_from_pipewire(struct data *data, const char *opt_remote)
return -1;
}
remote_name = "[" PW_DEFAULT_REMOTE "-manager," PW_DEFAULT_REMOTE "]";
if (opt_remote)
remote_name = opt_remote;
data->core = pw_context_connect(data->context,
pw_properties_new(
PW_KEY_REMOTE_NAME, opt_remote,
PW_KEY_REMOTE_NAME, remote_name,
NULL),
0);
if (data->core == NULL) {