summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-09-05 01:31:39 +0200
committerLennart Poettering <lennart@poettering.net>2008-09-05 01:31:39 +0200
commita609e4a700da10926fcb9c9633dee1342907de97 (patch)
tree9639b36fe6a9128615e0350b8a8a1ec9629f45da /src
parent3f6f13f90227d1adfe39b56671aa34745778f35d (diff)
check for errors returned by pa_context_connect()
Diffstat (limited to 'src')
-rw-r--r--src/utils/pacat.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 76aea36a..99df5b9e 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -773,7 +773,10 @@ int main(int argc, char *argv[]) {
pa_context_set_state_callback(context, context_state_callback, NULL);
/* Connect the context */
- pa_context_connect(context, server, 0, NULL);
+ if (pa_context_connect(context, server, 0, NULL) < 0) {
+ fprintf(stderr, _("pa_context_connect() failed: %s"), pa_strerror(pa_context_errno(context)));
+ goto quit;
+ }
if (verbose) {
struct timeval tv;