logind: fix session_activate(vtnr = 0)

VT numbers start with 1. If a session has vtnr == 0, we must not assume it
is running on a VT.
Note that this could trigger the assert() below as CreateSession() sets
vtnr to 0, not <0.
This commit is contained in:
David Herrmann
2013-09-17 13:48:41 -05:00
committed by Lennart Poettering
parent 20e1bd9d1b
commit 9209d5121d
+1 -1
View File
@@ -363,7 +363,7 @@ int session_activate(Session *s) {
assert(s);
assert(s->user);
if (s->vtnr < 0)
if (s->vtnr <= 0)
return -ENOTSUP;
if (!s->seat)