summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorTanu Kaskinen <tanu.kaskinen@digia.com>2012-03-29 12:18:32 +0300
committerTanu Kaskinen <tanuk@iki.fi>2012-12-19 12:31:49 +0200
commit188d037150feb29ce31438b1b258c6b2117f688e (patch)
tree36f7e288fc55979d1786d3447271ca0c097e742e /src/utils
parent9f832ca565f1c73d0bfec389314f1ece9d2b4424 (diff)
downloadpulseaudio-188d037150feb29ce31438b1b258c6b2117f688e.tar.gz
pasuspender: Check pa_context_connect() return value.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/pasuspender.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils/pasuspender.c b/src/utils/pasuspender.c
index 0a60923e0..58251911c 100644
--- a/src/utils/pasuspender.c
+++ b/src/utils/pasuspender.c
@@ -292,7 +292,11 @@ int main(int argc, char *argv[]) {
}
pa_context_set_state_callback(context, context_state_callback, NULL);
- pa_context_connect(context, server, PA_CONTEXT_NOAUTOSPAWN, NULL);
+
+ if (pa_context_connect(context, server, PA_CONTEXT_NOAUTOSPAWN, NULL) < 0) {
+ fprintf(stderr, "pa_context_connect() failed: %s\n", pa_strerror(pa_context_errno(context)));
+ goto quit;
+ }
if (pa_mainloop_run(m, &ret) < 0) {
fprintf(stderr, _("pa_mainloop_run() failed.\n"));