diff options
author | Václav Pavlín <vpavlin@redhat.com> | 2012-09-21 13:38:40 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-21 16:08:54 +0200 |
commit | ca4f2b6d6dbecce80d28a4b5126f8e83e1d4093b (patch) | |
tree | 474f76d0713aee9cca8c25c3b119c016d5321f35 /src/login | |
parent | 5a165aa6b9aa921d8b069059026d84e879ac38cc (diff) |
login: check return value of session_get_idle_hint
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/logind-session-dbus.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c index 9103781289..2e7bfe0445 100644 --- a/src/login/logind-session-dbus.c +++ b/src/login/logind-session-dbus.c @@ -183,12 +183,16 @@ static int bus_session_append_idle_hint_since(DBusMessageIter *i, const char *pr Session *s = data; dual_timestamp t; uint64_t u; + int r; assert(i); assert(property); assert(s); - session_get_idle_hint(s, &t); + r = session_get_idle_hint(s, &t); + if (r < 0) + return r; + u = streq(property, "IdleSinceHint") ? t.realtime : t.monotonic; if (!dbus_message_iter_append_basic(i, DBUS_TYPE_UINT64, &u)) |