summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-13 17:38:49 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-13 17:38:49 +0100
commit99123efc74ce3e1dda63c098c2a5813aca763409 (patch)
tree06626822f3061b8491e498305beb04e7111db36d
parent6130c10a598275f72cf124a75fdb2529987cee8b (diff)
downloadpa-sink-ctl-99123efc74ce3e1dda63c098c2a5813aca763409.tar.gz
pa-sink-ctl-99123efc74ce3e1dda63c098c2a5813aca763409.tar.bz2
pa-sink-ctl-99123efc74ce3e1dda63c098c2a5813aca763409.zip
Be a bit more verbose on connection error
-rw-r--r--src/pa-sink-ctl.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/pa-sink-ctl.c b/src/pa-sink-ctl.c
index 69f4fcc..e21b1a7 100644
--- a/src/pa-sink-ctl.c
+++ b/src/pa-sink-ctl.c
@@ -336,7 +336,7 @@ main(int argc, char** argv)
if (!(m = pa_glib_mainloop_new(NULL))) {
interface_clear(ctx);
- g_printerr("error: pa_glib_mainloop_new() failed.\n");
+ g_printerr("pa_glib_mainloop_newfailed\n");
return -1;
}
@@ -344,7 +344,8 @@ main(int argc, char** argv)
if (!(ctx->context = pa_context_new(mainloop_api, "pa-sink-ctl"))) {
interface_clear(ctx);
- g_printerr("error: pa_context_new() failed.\n");
+ g_printerr("pa_context_new failed: %s\n",
+ pa_strerror(pa_context_errno(ctx->context)));
return -1;
}
@@ -354,7 +355,8 @@ main(int argc, char** argv)
if (pa_context_connect(ctx->context, NULL,
PA_CONTEXT_NOAUTOSPAWN, NULL)) {
interface_clear(ctx);
- g_printerr("error: pa_context_connect() failed.\n");
+ g_printerr("pa_context_connect failed: %s\n",
+ pa_strerror(pa_context_errno(ctx->context)));
return -1;
}