sd-bus,sd-event: allow querying of description even after fork

This in unnecessarilly unpleasant: the code might report about a bus
connection, e.g. in an error message or assert. Let's let it query
the name of the object.

This partially reverts f4b2933ee7.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2023-05-18 17:05:41 +02:00
parent aa77ed55e1
commit ed7a6f51ea
2 changed files with 0 additions and 2 deletions

View file

@ -4198,7 +4198,6 @@ _public_ int sd_bus_get_description(sd_bus *bus, const char **description) {
assert_return(bus, -EINVAL);
assert_return(bus = bus_resolve(bus), -ENOPKG);
assert_return(description, -EINVAL);
assert_return(!bus_origin_changed(bus), -ECHILD);
const char *d = bus->description;
if (!d)

View file

@ -2603,7 +2603,6 @@ _public_ int sd_event_source_set_description(sd_event_source *s, const char *des
_public_ int sd_event_source_get_description(sd_event_source *s, const char **description) {
assert_return(s, -EINVAL);
assert_return(description, -EINVAL);
assert_return(!event_origin_changed(s->event), -ECHILD);
if (!s->description)
return -ENXIO;