#include "dbus-kill.h"
#include "dbus-scope.h"
#include "dbus-unit.h"
+#include "dbus-util.h"
#include "dbus.h"
#include "scope.h"
#include "selinux-access.h"
flags |= UNIT_PRIVATE;
+ if (streq(name, "TimeoutStopUSec"))
+ return bus_set_transient_usec(UNIT(s), name, &s->timeout_stop_usec, message, flags, error);
+
if (streq(name, "PIDs")) {
unsigned n = 0;
uint32_t pid;
return r;
}
- return 1;
-
- } else if (streq(name, "TimeoutStopUSec")) {
- uint64_t t;
-
- r = sd_bus_message_read(message, "t", &t);
- if (r < 0)
- return r;
-
- if (!UNIT_WRITE_FLAGS_NOOP(flags)) {
- s->timeout_stop_usec = t;
-
- unit_write_settingf(UNIT(s), flags, name, "TimeoutStopSec=" USEC_FMT "us", t);
- }
-
return 1;
}