audio/pw: Report more accurate error when connecting to PipeWire fails
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 18 Sep 2024 08:17:06 +0000 (10:17 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Mon, 14 Oct 2024 13:35:24 +0000 (17:35 +0400)
commit4cd78a3db2478d3c1527905a26c9d3fbee83ccac
tree79ce2939a985ed2fe6d63d2c9f4c608507ccc55a
parentab10297a4ab1dac64baf04ed66929bef60e67d2e
audio/pw: Report more accurate error when connecting to PipeWire fails

According to its man page [1], pw_context_connect() sets errno on
failure:

  Returns a Core on success or NULL with errno set on error.

It may be handy to see errno when figuring out why PipeWire
failed to connect. That leaves us with just one possible path to
reach 'fail_error' label which is then moved to that path and
also its error message is adjusted slightly.

1: https://docs.pipewire.org/group__pw__core.html#ga5994e3a54e4ec718094ca02a1234815b

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <3a78811ad5b0e87816b7616ab21d2eeef00b9c52.1726647033.git.mprivozn@redhat.com>
audio/pwaudio.c