mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pipewire-alsa: Propagate errors from eventfd().
Propagate the error if spa_system_eventfd_create() fails. Also copy errno before calling spa_log_debug() in spa_system_eventfd_create() to make sure it is not overwritten.
This commit is contained in:
parent
b3e3d301c0
commit
e78e97cb99
3 changed files with 9 additions and 4 deletions
|
|
@ -1359,8 +1359,8 @@ SND_CTL_PLUGIN_DEFINE_FUNC(pipewire)
|
|||
|
||||
ctl->system = loop->system;
|
||||
ctl->fd = spa_system_eventfd_create(ctl->system, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (ctl->fd == -1) {
|
||||
err = -errno;
|
||||
if (ctl->fd < 0) {
|
||||
err = ctl->fd;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1260,6 +1260,10 @@ static int snd_pcm_pipewire_open(snd_pcm_t **pcmp,
|
|||
pw_thread_loop_unlock(pw->main_loop);
|
||||
|
||||
pw->fd = spa_system_eventfd_create(pw->system, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (pw->fd < 0) {
|
||||
err = pw->fd;
|
||||
goto error;
|
||||
}
|
||||
|
||||
pw->io.version = SND_PCM_IOPLUG_VERSION;
|
||||
pw->io.name = "ALSA <-> PipeWire PCM I/O Plugin";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue