summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc-André Lureau <marc-andre.lureau@nokia.com>2009-02-17 20:34:05 +0200
committerLennart Poettering <lennart@poettering.net>2009-02-19 04:53:41 +0100
commita8369274952ad81ed2b05800d182e35efd26e41d (patch)
tree4d6a2a12b4f1c85f622c3247db350244557b072f /src
parent93ed27d5617202441bd9be346ce916289fe7128d (diff)
tests/sync-playback: check if pa_context_connect succeed
Diffstat (limited to 'src')
-rw-r--r--src/tests/sync-playback.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tests/sync-playback.c b/src/tests/sync-playback.c
index 42c479a1..f2a15601 100644
--- a/src/tests/sync-playback.c
+++ b/src/tests/sync-playback.c
@@ -174,11 +174,16 @@ int main(int argc, char *argv[]) {
pa_context_set_state_callback(context, context_state_callback, NULL);
- pa_context_connect(context, NULL, 0, NULL);
+ /* Connect the context */
+ if (pa_context_connect(context, NULL, 0, NULL) < 0) {
+ fprintf(stderr, "pa_context_connect() failed.\n");
+ goto quit;
+ }
if (pa_mainloop_run(m, &ret) < 0)
fprintf(stderr, "pa_mainloop_run() failed.\n");
+quit:
pa_context_unref(context);
for (i = 0; i < NSTREAMS; i++)