summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b67f562)
Setting a child-source state to anything but SD_EVENT_OFF currently does
nothing. The condition logic is flawed. Move the state update *below* the
test for the previous state.
Fixes a crash if you call:
sd_event_source_set_enabled(source, SD_EVENT_ON);
sd_event_source_unref(source);
on a child-source in its own callback.
break;
case SOURCE_CHILD:
break;
case SOURCE_CHILD:
if (s->enabled == SD_EVENT_OFF) {
s->event->n_enabled_child_sources++;
if (s->enabled == SD_EVENT_OFF) {
s->event->n_enabled_child_sources++;
event_update_signal_fd(s->event);
}
}
event_update_signal_fd(s->event);
}
}