sd-event: several follow-ups for recent change (#39743)

This commit is contained in:
Daan De Meyer
2025-11-15 22:47:42 +01:00
committed by GitHub
2 changed files with 7 additions and 7 deletions

View File

@@ -4249,12 +4249,6 @@ static int source_dispatch(sd_event_source *s) {
s->dispatching = false;
/* More post sources might have been added while executing the callback, let's make sure
* those are marked pending as well. */
r = maybe_mark_post_sources_pending(saved_type, saved_event);
if (r < 0)
return r;
finish:
if (r < 0) {
log_debug_errno(r, "Event source %s (type %s) returned error, %s: %m",
@@ -4271,6 +4265,12 @@ finish:
else if (r < 0)
assert_se(sd_event_source_set_enabled(s, SD_EVENT_OFF) >= 0);
/* More post sources might have been added while executing the callback, let's make sure
* those are marked pending as well. */
r = maybe_mark_post_sources_pending(saved_type, saved_event);
if (r < 0)
return r;
return 1;
}

View File

@@ -1075,7 +1075,7 @@ static int exit_on_idle_defer_handler(sd_event_source *s, void *userdata) {
/* Disable ourselves, which should trigger exit-on-idle after the second iteration */
if (*c == 2)
sd_event_source_set_enabled(s, SD_EVENT_OFF);
ASSERT_OK(sd_event_source_set_enabled(s, SD_EVENT_OFF));
return 0;
}