chiark / gitweb /
logind,machined,run: properly invoke StartTransientUnit() bus call
authorLennart Poettering <lennart@poettering.net>
Thu, 21 Nov 2013 19:05:49 +0000 (20:05 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 21 Nov 2013 20:12:36 +0000 (21:12 +0100)
src/libsystemd-bus/bus-objects.c
src/login/logind-dbus.c
src/machine/machined-dbus.c
src/run/run.c

index 8413023..06be5ed 100644 (file)
@@ -292,14 +292,11 @@ static int method_callbacks_run(
                 return -EINVAL;
 
         if (!streq(strempty(c->vtable->x.method.signature), signature)) {
-                r = sd_bus_reply_method_errorf(m,
-                                               SD_BUS_ERROR_INVALID_ARGS,
-                                               "Invalid arguments '%s' to call %s:%s, expecting '%s'.",
-                                               signature, c->interface, c->member, strempty(c->vtable->x.method.signature));
-                if (r < 0)
-                        return r;
-
-                return 1;
+                return sd_bus_reply_method_errorf(
+                                m,
+                                SD_BUS_ERROR_INVALID_ARGS,
+                                "Invalid arguments '%s' to call %s.%s(), expecting '%s'.",
+                                signature, c->interface, c->member, strempty(c->vtable->x.method.signature));
         }
 
         if (c->vtable->x.method.handler) {
index b1c2ef1..a52b001 100644 (file)
@@ -2216,6 +2216,10 @@ int manager_start_scope(
         if (r < 0)
                 return r;
 
+        r = sd_bus_message_append(m, "a(sa(sv))", 0);
+        if (r < 0)
+                return r;
+
         r = sd_bus_call(manager->bus, m, 0, error, &reply);
         if (r < 0)
                 return r;
index eda582a..34cd61d 100644 (file)
@@ -527,6 +527,10 @@ int manager_start_scope(
         if (r < 0)
                 return r;
 
+        r = sd_bus_message_append(m, "a(sa(sv))", 0);
+        if (r < 0)
+                return r;
+
         r = sd_bus_call(manager->bus, m, 0, error, &reply);
         if (r < 0)
                 return r;
index 539db6f..2e0cd1a 100644 (file)
@@ -237,6 +237,10 @@ static int message_start_transient_unit_send(sd_bus *bus, sd_bus_message *m, sd_
         if (r < 0)
                 return r;
 
+        r = sd_bus_message_append(m, "a(sa(sv))", 0);
+        if (r < 0)
+                return r;
+
         return sd_bus_call(bus, m, 0, error, reply);
 }