chiark / gitweb /
journal: fail silently in sd_j_sendv() if journal is unavailable
[elogind.git] / src / core / manager.c
index 7de0b268112af4a05d02ff3b59b2ccc6f08fe819..19493861ecdbb0566bac615d53d91650ca88084f 100644 (file)
@@ -414,6 +414,7 @@ static int manager_setup_kdbus(Manager *m) {
 
         assert(m);
 
+#ifdef ENABLE_KDBUS
         if (m->kdbus_fd >= 0)
                 return 0;
 
@@ -428,6 +429,8 @@ static int manager_setup_kdbus(Manager *m) {
         }
 
         log_info("Successfully set up kdbus on %s", p);
+#endif
+
         return 0;
 }
 
@@ -2169,7 +2172,7 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
                 } else if (startswith(l, "kdbus-fd=")) {
                         int fd;
 
-                        if (safe_atoi(l + 9, &fd) < 0 || !fdset_contains(fds, fd))
+                        if (safe_atoi(l + 9, &fd) < 0 || fd < 0 || !fdset_contains(fds, fd))
                                 log_debug("Failed to parse kdbus fd: %s", l + 9);
                         else {
                                 if (m->kdbus_fd >= 0)