if (!uctrl)
return;
- uctrl->event_source_connect = sd_event_source_unref(uctrl->event_source_connect);
+ uctrl->event_source_connect = sd_event_source_disable_unref(uctrl->event_source_connect);
uctrl->sock_connect = safe_close(uctrl->sock_connect);
}
udev_ctrl_disconnect(uctrl);
- sd_event_source_unref(uctrl->event_source);
+ sd_event_source_disable_unref(uctrl->event_source);
safe_close(uctrl->sock);
sd_event_unref(uctrl->event);
}
int udev_ctrl_wait(UdevCtrl *uctrl, usec_t timeout) {
- _cleanup_(sd_event_source_unrefp) sd_event_source *source_io = NULL, *source_timeout = NULL;
+ _cleanup_(sd_event_source_disable_unrefp) sd_event_source *source_io = NULL, *source_timeout = NULL;
int r;
assert(uctrl);
static int spawn_wait(Spawn *spawn) {
_cleanup_(sd_event_unrefp) sd_event *e = NULL;
- _cleanup_(sd_event_source_unrefp) sd_event_source *sigchld_source = NULL;
- _cleanup_(sd_event_source_unrefp) sd_event_source *stdout_source = NULL;
- _cleanup_(sd_event_source_unrefp) sd_event_source *stderr_source = NULL;
+ _cleanup_(sd_event_source_disable_unrefp) sd_event_source *sigchld_source = NULL;
+ _cleanup_(sd_event_source_disable_unrefp) sd_event_source *stdout_source = NULL;
+ _cleanup_(sd_event_source_disable_unrefp) sd_event_source *stderr_source = NULL;
int r;
assert(spawn);
sd_device_unref(event->dev);
sd_device_unref(event->dev_kernel);
- sd_event_source_unref(event->timeout_warning_event);
- sd_event_source_unref(event->timeout_event);
+ sd_event_source_disable_unref(event->timeout_warning_event);
+ sd_event_source_disable_unref(event->timeout_event);
if (event->worker)
event->worker->event = NULL;
static void manager_clear_for_worker(Manager *manager) {
assert(manager);
- manager->inotify_event = sd_event_source_unref(manager->inotify_event);
- manager->kill_workers_event = sd_event_source_unref(manager->kill_workers_event);
+ manager->inotify_event = sd_event_source_disable_unref(manager->inotify_event);
+ manager->kill_workers_event = sd_event_source_disable_unref(manager->kill_workers_event);
manager->event = sd_event_unref(manager->event);
/* close sources of new events and discard buffered events */
manager->ctrl = udev_ctrl_unref(manager->ctrl);
- manager->inotify_event = sd_event_source_unref(manager->inotify_event);
+ manager->inotify_event = sd_event_source_disable_unref(manager->inotify_event);
manager->inotify_fd = safe_close(manager->inotify_fd);
manager->monitor = sd_device_monitor_unref(manager->monitor);