1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 09:56:51 +03:00

dbus-util: properly parse timeout values

This makes transient TimeoutStopSec= properties work. After all they are
64bit entitites, not 32bit ones.
This commit is contained in:
Lennart Poettering 2018-01-05 12:17:35 +01:00
parent da5fb86100
commit d6552eaa6c

View File

@ -93,12 +93,12 @@ int bus_set_transient_usec_internal(
UnitWriteFlags flags,
sd_bus_error *error) {
usec_t v;
uint64_t v;
int r;
assert(p);
r = sd_bus_message_read(message, "u", &v);
r = sd_bus_message_read(message, "t", &v);
if (r < 0)
return r;
@ -106,7 +106,7 @@ int bus_set_transient_usec_internal(
char *n, ts[FORMAT_TIMESPAN_MAX];
if (fix_0)
*p = v ?: USEC_INFINITY;
*p = v != 0 ? v: USEC_INFINITY;
else
*p = v;