chiark / gitweb /
sd-login: always return two arrays of same length from sd_seat_get_sessions
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 19 May 2017 00:48:09 +0000 (20:48 -0400)
committerSven Eden <yamakuzure@gmx.net>
Tue, 25 Jul 2017 07:46:52 +0000 (09:46 +0200)
commitc25b9ce75a7b1a440c788154c21353d3d1dbe337
treed0f38b4b7fc346e9f9c7a08cd5fecd5a727edfc2
parent502ca32e2b63522a0ba088ede194215b98f432bc
sd-login: always return two arrays of same length from sd_seat_get_sessions

sd_seat_get_sessions returns two arrays, that in principle should always match:
the session names and corresponding uids. The second array could be shorter only
if parsing or uid conversion fails. But in that case there is no way to tell
*which* uid is wrong, so they are *all* useless. It's better to simplify things and
just return an error if parsing fails.
man/sd_seat_get_active.xml
src/libelogind/sd-login/sd-login.c