[systemd-commits] 2 commits - src/dbus-unit.c src/service.c src/unit.c

Lennart Poettering lennart at kemper.freedesktop.org
Mon Aug 9 08:07:17 PDT 2010


 src/dbus-unit.c |    6 ++++++
 src/service.c   |    2 ++
 src/unit.c      |    3 +++
 3 files changed, 11 insertions(+)

New commits:
commit 2cf3143ac3650feff2e3069d6d02bb8e46ab1929
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Aug 9 17:03:46 2010 +0200

    service: show restart value in dump

diff --git a/src/service.c b/src/service.c
index ee1da2a..fce1b27 100644
--- a/src/service.c
+++ b/src/service.c
@@ -952,12 +952,14 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) {
                 "%sRootDirectoryStartOnly: %s\n"
                 "%sValidNoProcess: %s\n"
                 "%sType: %s\n"
+                "%sRestart: %s\n"
                 "%sNotifyAccess: %s\n",
                 prefix, service_state_to_string(s->state),
                 prefix, yes_no(s->permissions_start_only),
                 prefix, yes_no(s->root_directory_start_only),
                 prefix, yes_no(s->valid_no_process),
                 prefix, service_type_to_string(s->type),
+                prefix, service_restart_to_string(s->restart),
                 prefix, notify_access_to_string(s->notify_access));
 
         if (s->control_pid > 0)
commit 04ade7d215ce05f1ac2bd33a8d6126f6994168fa
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon Aug 9 17:02:09 2010 +0200

    dbus: don't call bus_path_escape() with NULL unit name
    
    Fixes an assertion triggerable via D-Bus.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=622008

diff --git a/src/dbus-unit.c b/src/dbus-unit.c
index d25f325..c9ccac1 100644
--- a/src/dbus-unit.c
+++ b/src/dbus-unit.c
@@ -434,6 +434,9 @@ void bus_unit_send_change_signal(Unit *u) {
                 u->meta.in_dbus_queue = false;
         }
 
+        if (!u->meta.id)
+                return;
+
         if (!bus_has_subscriber(u->meta.manager)) {
                 u->meta.sent_dbus_new_signal = true;
                 return;
@@ -491,6 +494,9 @@ void bus_unit_send_removed_signal(Unit *u) {
         if (!u->meta.sent_dbus_new_signal)
                 bus_unit_send_change_signal(u);
 
+        if (!u->meta.id)
+                return;
+
         if (!(p = unit_dbus_path(u)))
                 goto oom;
 
diff --git a/src/unit.c b/src/unit.c
index 840c1d1..dd665e2 100644
--- a/src/unit.c
+++ b/src/unit.c
@@ -1551,6 +1551,9 @@ char *unit_dbus_path(Unit *u) {
 
         assert(u);
 
+        if (!u->meta.id)
+                return NULL;
+
         if (!(e = bus_path_escape(u->meta.id)))
                 return NULL;
 


More information about the systemd-commits mailing list