chiark / gitweb /
machined: ignore spurious error
authorLennart Poettering <lennart@poettering.net>
Mon, 29 Dec 2014 18:08:50 +0000 (19:08 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 29 Dec 2014 18:08:50 +0000 (19:08 +0100)
src/login/logind-dbus.c
src/machine/machined-dbus.c

index 26ce8fe11f1f1ff082d95a50f01664d3b4f3fe39..bbb4ae2de66a912168a68bf5c658551f4f95c815 100644 (file)
@@ -2111,9 +2111,10 @@ int match_properties_changed(sd_bus *bus, sd_bus_message *message, void *userdat
                 return 0;
 
         r = unit_name_from_dbus_path(path, &unit);
                 return 0;
 
         r = unit_name_from_dbus_path(path, &unit);
+        if (r == -EINVAL) /* not a unit */
+                return 0;
         if (r < 0)
         if (r < 0)
-                /* quietly ignore non-units paths */
-                return r == -EINVAL ? 0 : r;
+                return r;
 
         session = hashmap_get(m->session_units, unit);
         if (session)
 
         session = hashmap_get(m->session_units, unit);
         if (session)
index 94dd128ec1d60c8520a472e4b13e5048595908e0..b894e0b44448264402de15f8a8f0f417a36ebf6e 100644 (file)
@@ -738,6 +738,8 @@ int match_properties_changed(sd_bus *bus, sd_bus_message *message, void *userdat
                 return 0;
 
         r = unit_name_from_dbus_path(path, &unit);
                 return 0;
 
         r = unit_name_from_dbus_path(path, &unit);
+        if (r == -EINVAL) /* not for a unit */
+                return 0;
         if (r < 0)
                 return r;
 
         if (r < 0)
                 return r;