diff options
author | Wim Taymans <wtaymans@redhat.com> | 2020-04-22 11:28:32 +0200 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2020-04-22 11:28:32 +0200 |
commit | d68e7ed58abc6c3d4104f4652783a5a26f08a7b1 (patch) | |
tree | 5d266a18e96b2557402c3eee3de9ddb7503b4c13 | |
parent | 2e06d0819b5a86229cbd0b4eb8862165bfe10880 (diff) |
tools: handle connection error
-rw-r--r-- | src/tools/pw-cli.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/pw-cli.c b/src/tools/pw-cli.c index 4e0342bc..bb90a2e8 100644 --- a/src/tools/pw-cli.c +++ b/src/tools/pw-cli.c @@ -2816,7 +2816,11 @@ int main(int argc, char *argv[]) pw_context_load_module(data.context, "libpipewire-module-link-factory", NULL, NULL); - do_connect(&data, "connect", opt_remote, &error); + if (!do_connect(&data, "connect", opt_remote, &error)) { + fprintf(stderr, "Error: \"%s\"\n", error); + return -1; + } + if (optind == argc) { data.interactive = true; |