mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
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:
parent
aa77ed55e1
commit
ed7a6f51ea
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue