diff options
author | Tanu Kaskinen <tanu.kaskinen@digia.com> | 2012-03-29 12:18:32 +0300 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2012-12-19 12:31:49 +0200 |
commit | 188d037150feb29ce31438b1b258c6b2117f688e (patch) | |
tree | 36f7e288fc55979d1786d3447271ca0c097e742e /src/utils | |
parent | 9f832ca565f1c73d0bfec389314f1ece9d2b4424 (diff) | |
download | pulseaudio-188d037150feb29ce31438b1b258c6b2117f688e.tar.gz |
pasuspender: Check pa_context_connect() return value.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/pasuspender.c | 6 |
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")); |