sd-event: do not ignore result of callbacks
Follow-up for4c8b6d636cand6aff6d3ffc. Fixes CID#1643218 and friends.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user