summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWim Taymans <wtaymans@redhat.com>2020-04-22 11:28:32 +0200
committerWim Taymans <wtaymans@redhat.com>2020-04-22 11:28:32 +0200
commitd68e7ed58abc6c3d4104f4652783a5a26f08a7b1 (patch)
tree5d266a18e96b2557402c3eee3de9ddb7503b4c13
parent2e06d0819b5a86229cbd0b4eb8862165bfe10880 (diff)
tools: handle connection error
-rw-r--r--src/tools/pw-cli.c6
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;