projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da5fb86
)
dbus-util: properly parse timeout values
author
Lennart Poettering
<lennart@poettering.net>
Fri, 5 Jan 2018 11:17:35 +0000
(12:17 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Thu, 11 Jan 2018 14:12:16 +0000
(15:12 +0100)
This makes transient TimeoutStopSec= properties work. After all they are
64bit entitites, not 32bit ones.
src/core/dbus-util.c
patch
|
blob
|
history
diff --git
a/src/core/dbus-util.c
b/src/core/dbus-util.c
index
ed83a0e
..
75bbd07
100644
(file)
--- a/
src/core/dbus-util.c
+++ b/
src/core/dbus-util.c
@@
-93,12
+93,12
@@
int bus_set_transient_usec_internal(
UnitWriteFlags flags,
sd_bus_error *error) {
- u
sec
_t v;
+ u
int64
_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;