mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
pactl: check if pa_context_connect succeed
This commit is contained in:
parent
2aeab75c68
commit
93ed27d561
1 changed files with 4 additions and 1 deletions
|
|
@ -1029,7 +1029,10 @@ int main(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
pa_context_set_state_callback(context, context_state_callback, NULL);
|
||||
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 (pa_mainloop_run(m, &ret) < 0) {
|
||||
fprintf(stderr, _("pa_mainloop_run() failed.\n"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue