chiark / gitweb /
bus: add SD_BUS_NAME_REPLACE_EXISTING to all activatable services, fix one flags...
authorKay Sievers <kay@vrfy.org>
Thu, 12 Dec 2013 05:23:38 +0000 (06:23 +0100)
committerKay Sievers <kay@vrfy.org>
Thu, 12 Dec 2013 05:41:23 +0000 (06:41 +0100)
src/hostname/hostnamed.c
src/libsystemd-bus/bus-kernel.c
src/locale/localed.c
src/login/logind.c
src/machine/machined.c
src/timedate/timedated.c

index 3f08d1c..36845c4 100644 (file)
@@ -574,7 +574,7 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
                 return r;
         }
 
-        r = sd_bus_request_name(bus, "org.freedesktop.hostname1", 0);
+        r = sd_bus_request_name(bus, "org.freedesktop.hostname1", SD_BUS_NAME_REPLACE_EXISTING);
         if (r < 0) {
                 log_error("Failed to register name: %s", strerror(-r));
                 return r;
index 0437c96..c5817a7 100644 (file)
@@ -1020,7 +1020,7 @@ int kdbus_translate_request_name_flags(uint64_t flags, uint64_t *kdbus_flags) {
         if (flags & SD_BUS_NAME_REPLACE_EXISTING)
                 f |= KDBUS_NAME_REPLACE_EXISTING;
 
-        if (!(flags & SD_BUS_NAME_QUEUE))
+        if (flags & SD_BUS_NAME_QUEUE)
                 f |= KDBUS_NAME_QUEUE;
 
         *kdbus_flags = f;
index 65318b6..54f2971 100644 (file)
@@ -1094,7 +1094,7 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
                 return r;
         }
 
-        r = sd_bus_request_name(bus, "org.freedesktop.locale1", 0);
+        r = sd_bus_request_name(bus, "org.freedesktop.locale1", SD_BUS_NAME_REPLACE_EXISTING);
         if (r < 0) {
                 log_error("Failed to register name: %s", strerror(-r));
                 return r;
index 2226087..29f5272 100644 (file)
@@ -727,7 +727,7 @@ static int manager_connect_bus(Manager *m) {
                 return r;
         }
 
-        r = sd_bus_request_name(m->bus, "org.freedesktop.login1", 0);
+        r = sd_bus_request_name(m->bus, "org.freedesktop.login1", SD_BUS_NAME_REPLACE_EXISTING);
         if (r < 0) {
                 log_error("Failed to register name: %s", strerror(-r));
                 return r;
index 6550075..f695cfe 100644 (file)
@@ -219,7 +219,7 @@ static int manager_connect_bus(Manager *m) {
                 return r;
         }
 
-        r = sd_bus_request_name(m->bus, "org.freedesktop.machine1", 0);
+        r = sd_bus_request_name(m->bus, "org.freedesktop.machine1", SD_BUS_NAME_REPLACE_EXISTING);
         if (r < 0) {
                 log_error("Failed to register name: %s", strerror(-r));
                 return r;
index 37173a2..c1ceeee 100644 (file)
@@ -791,7 +791,7 @@ static int connect_bus(Context *c, sd_event *event, sd_bus **_bus) {
                 return r;
         }
 
-        r = sd_bus_request_name(bus, "org.freedesktop.timedate1", 0);
+        r = sd_bus_request_name(bus, "org.freedesktop.timedate1", SD_BUS_NAME_REPLACE_EXISTING);
         if (r < 0) {
                 log_error("Failed to register name: %s", strerror(-r));
                 return r;