1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00

networkd: gracefully handle failure to emit signals when dbus is not connected

When we get kdbus we don't need these hackse.
This commit is contained in:
Tom Gundersen 2015-02-05 17:59:40 +01:00
parent b2086f601b
commit 4852e15970
2 changed files with 6 additions and 0 deletions

View File

@ -108,6 +108,9 @@ int link_send_changed(Link *link, const char *property, ...) {
assert(link); assert(link);
assert(link->manager); assert(link->manager);
if (!link->manager->bus)
return 0; /* replace with assert when we have kdbus */
l = strv_from_stdarg_alloca(property); l = strv_from_stdarg_alloca(property);
p = link_bus_path(link); p = link_bus_path(link);

View File

@ -38,6 +38,9 @@ int manager_send_changed(Manager *manager, const char *property, ...) {
assert(manager); assert(manager);
if (!manager->bus)
return 0; /* replace by assert when we have kdbus */
l = strv_from_stdarg_alloca(property); l = strv_from_stdarg_alloca(property);
return sd_bus_emit_properties_changed_strv( return sd_bus_emit_properties_changed_strv(