mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-05 06:46:28 -04:00
plugins: handle some fd allocation errors
This commit is contained in:
parent
09dda9e4e0
commit
96594d6716
9 changed files with 20 additions and 0 deletions
|
|
@ -1067,6 +1067,8 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
this->timer_source.data = this;
|
||||
this->timer_source.fd = spa_system_timerfd_create(this->data_system,
|
||||
CLOCK_MONOTONIC, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (this->timer_source.fd < 0)
|
||||
return this->timer_source.fd;
|
||||
this->timer_source.mask = SPA_IO_IN;
|
||||
this->timer_source.rmask = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -2270,6 +2270,8 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
|
||||
this->timerfd = spa_system_timerfd_create(this->data_system,
|
||||
CLOCK_MONOTONIC, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (this->timerfd < 0)
|
||||
return this->timerfd;
|
||||
|
||||
this->node_latency = 512;
|
||||
|
||||
|
|
|
|||
|
|
@ -2089,6 +2089,10 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
|
||||
this->timerfd = spa_system_timerfd_create(this->data_system,
|
||||
CLOCK_MONOTONIC, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (this->timerfd < 0) {
|
||||
res = this->timerfd;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1042,6 +1042,8 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
this->timer_source.data = this;
|
||||
this->timer_source.fd = spa_system_timerfd_create(this->data_system,
|
||||
this->timer_clockid, SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (this->timer_source.fd < 0)
|
||||
return this->timer_source.fd;
|
||||
|
||||
this->timer_source.mask = SPA_IO_IN;
|
||||
this->timer_source.rmask = 0;
|
||||
|
|
|
|||
|
|
@ -930,6 +930,8 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
this->timer_source.data = this;
|
||||
this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC,
|
||||
SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (this->timer_source.fd < 0)
|
||||
return this->timer_source.fd;
|
||||
this->timer_source.mask = SPA_IO_IN;
|
||||
this->timer_source.rmask = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -708,6 +708,8 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
this->timer_source.data = this;
|
||||
this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC,
|
||||
SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (this->timer_source.fd < 0)
|
||||
return this->timer_source.fd;
|
||||
this->timer_source.mask = SPA_IO_IN;
|
||||
this->timer_source.rmask = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -767,6 +767,8 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
this->timer_source.data = this;
|
||||
this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC,
|
||||
SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (this->timer_source.fd < 0)
|
||||
return this->timer_source.fd;
|
||||
this->timer_source.mask = SPA_IO_IN;
|
||||
this->timer_source.rmask = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -906,6 +906,8 @@ impl_init(const struct spa_handle_factory *factory,
|
|||
this->timer_source.data = this;
|
||||
this->timer_source.fd = spa_system_timerfd_create(this->data_system, CLOCK_MONOTONIC,
|
||||
SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (this->timer_source.fd < 0)
|
||||
return this->timer_source.fd;
|
||||
this->timer_source.mask = SPA_IO_IN;
|
||||
this->timer_source.rmask = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -1392,6 +1392,8 @@ static void node_initialized(void *data)
|
|||
|
||||
impl->data_source.fd = spa_system_eventfd_create(data_system,
|
||||
SPA_FD_CLOEXEC | SPA_FD_NONBLOCK);
|
||||
if (impl->data_source.fd < 0)
|
||||
return;
|
||||
|
||||
spa_loop_add_source(impl->data_loop, &impl->data_source);
|
||||
pw_log_debug("%p: transport read-fd:%d write-fd:%d", impl,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue