system: use spa_system functions for fds

This commit is contained in:
Wim Taymans 2019-11-19 13:40:46 +01:00
parent b14bb1f496
commit 68e94a2e7e
16 changed files with 96 additions and 60 deletions

View file

@ -183,7 +183,7 @@ static int impl_clear(struct spa_handle *handle)
if (this->have_source) {
spa_loop_remove_source(this->source.loop, &this->source);
close(this->source.fd);
spa_system_close(this->system, this->source.fd);
this->have_source = false;
}
return 0;

View file

@ -627,7 +627,7 @@ static void loop_destroy_source(void *object, struct spa_source *source)
loop_remove_source(impl->impl, source);
if (source->fd != -1 && impl->close) {
close(source->fd);
spa_system_close(impl->impl->system, source->fd);
source->fd = -1;
}
spa_list_insert(&impl->impl->destroy_list, &impl->link);