mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-02 09:01:46 -05:00
check for errors returned by pa_context_connect()
This commit is contained in:
parent
3f6f13f902
commit
a609e4a700
1 changed files with 4 additions and 1 deletions
|
|
@ -773,7 +773,10 @@ int main(int argc, char *argv[]) {
|
|||
pa_context_set_state_callback(context, context_state_callback, NULL);
|
||||
|
||||
/* Connect the context */
|
||||
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 (verbose) {
|
||||
struct timeval tv;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue