chiark / gitweb /
networkd: gracefully handle failure to emit signals when dbus is not connected
authorTom Gundersen <teg@jklm.no>
Thu, 5 Feb 2015 16:59:40 +0000 (17:59 +0100)
committerTom Gundersen <teg@jklm.no>
Thu, 5 Feb 2015 17:02:42 +0000 (18:02 +0100)
When we get kdbus we don't need these hackse.

src/network/networkd-link-bus.c
src/network/networkd-manager-bus.c

index 645c47a..f7eae87 100644 (file)
@@ -108,6 +108,9 @@ int link_send_changed(Link *link, const char *property, ...) {
         assert(link);
         assert(link->manager);
 
+        if (!link->manager->bus)
+                return 0; /* replace with assert when we have kdbus */
+
         l = strv_from_stdarg_alloca(property);
 
         p = link_bus_path(link);
index 7753c5d..b281f4f 100644 (file)
@@ -38,6 +38,9 @@ int manager_send_changed(Manager *manager, const char *property, ...) {
 
         assert(manager);
 
+        if (!manager->bus)
+                return 0; /* replace by assert when we have kdbus */
+
         l = strv_from_stdarg_alloca(property);
 
         return sd_bus_emit_properties_changed_strv(