logind,machined,run: properly invoke StartTransientUnit() bus call

This commit is contained in:
Lennart Poettering 2013-11-21 20:05:49 +01:00
parent ebcf1f97de
commit 86b8d28971
4 changed files with 17 additions and 8 deletions

View 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) {

View 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;

View 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;

View 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);
}