From: Daan De Meyer Date: Thu, 13 Nov 2025 21:33:11 +0000 (+0100) Subject: sd-event: Drop faulty shortcut X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0a79791d0a9569d2bb34b71d3ca4e4286ca02338;p=thirdparty%2Fsystemd.git sd-event: Drop faulty shortcut We can't take this shortcut, as we might have to drop the EPOLLONESHOT flag for some event sources, so drop the shortcut. --- diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 7d8d779742f..fbe7656925e 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -3044,16 +3044,8 @@ _public_ int sd_event_source_set_enabled(sd_event_source *s, int m) { if (m == SD_EVENT_OFF) r = event_source_offline(s, m, s->ratelimited); - else { - if (s->enabled != SD_EVENT_OFF) { - /* Switching from "on" to "oneshot" or back? If that's the case, we can take a shortcut, the - * event source is already enabled after all. */ - s->enabled = m; - return 0; - } - + else r = event_source_online(s, m, s->ratelimited); - } if (r < 0) return r;