mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
pasuspender: Check pa_context_connect() return value.
This commit is contained in:
parent
9f832ca565
commit
188d037150
1 changed files with 5 additions and 1 deletions
|
|
@ -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"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue