tools: make pw-dump/mon/top try to connect to the default manager socket

These tools are used for debugging, and should default to connecting to
the manager socket if present.
This commit is contained in:
Pauli Virtanen 2023-10-19 23:36:27 +03:00 committed by Wim Taymans
parent 9eaf1184c2
commit 963ea1f57c
3 changed files with 6 additions and 3 deletions

View file

@ -1608,7 +1608,8 @@ int main(int argc, char *argv[])
data.core = pw_context_connect(data.context,
pw_properties_new(
PW_KEY_REMOTE_NAME, opt_remote,
PW_KEY_REMOTE_NAME, opt_remote ? opt_remote :
("[" PW_DEFAULT_REMOTE "-manager," PW_DEFAULT_REMOTE "]"),
NULL),
0);
if (data.core == NULL) {