logind,machined,run: properly invoke StartTransientUnit() bus call
This commit is contained in:
parent
ebcf1f97de
commit
86b8d28971
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue