[systemd-commits] 2 commits - src/libsystemd src/nspawn

Lennart Poettering lennart at kemper.freedesktop.org
Wed Feb 5 14:06:52 PST 2014


 src/libsystemd/sd-bus/sd-bus.c |    3 +++
 src/nspawn/nspawn.c            |    2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 1c03020cc48d41c94a51b5efbeeccb96e45d3e26
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 5 23:06:34 2014 +0100

    nspawn: always use default bus

diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index cd63bf6..ed13e81 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -1025,7 +1025,7 @@ static int register_machine(pid_t pid) {
         _cleanup_bus_unref_ sd_bus *bus = NULL;
         int r;
 
-        r = sd_bus_open_system(&bus);
+        r = sd_bus_default_system(&bus);
         if (r < 0) {
                 log_error("Failed to open system bus: %s", strerror(-r));
                 return r;

commit f4d140e9a60ca76d36d4539059e463a5db6a3a9d
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Feb 5 23:06:13 2014 +0100

    bus: properly unset default bus pointer when destroying last reference

diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 4fdc246..1187690 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -132,6 +132,9 @@ static void bus_free(sd_bus *b) {
 
         sd_bus_detach_event(b);
 
+        if (b->default_bus_ptr)
+                *b->default_bus_ptr = NULL;
+
         bus_close_fds(b);
 
         if (b->kdbus_buffer)



More information about the systemd-commits mailing list