summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <yamakuzure@gmx.net>2018-08-16 08:07:55 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commitae891c00cf40d39097656646966749265da6c5c9 (patch)
treeaf43b12afc9723758a6ebc2716c8376b9d51b1d1
parent95ddf8036d90ed95e4087b2a3aef3f9dc9561e1b (diff)
Prep v239: sync manager_get_user_by_pid() with upstream updates
-rw-r--r--src/login/logind-core.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/login/logind-core.c b/src/login/logind-core.c
index fe4da328c..eecf20e9e 100644
--- a/src/login/logind-core.c
+++ b/src/login/logind-core.c
@@ -384,6 +384,15 @@ int manager_get_user_by_pid(Manager *m, pid_t pid, User **ret) {
if (ret)
*ret = u;
+#else
+ r = manager_get_session_by_pid (m, pid, &s);
+ if (r <= 0)
+ goto not_found;
+
+ if (ret)
+ *ret = s->user;
+#endif // 0
+
return 1;
not_found:
@@ -391,15 +400,6 @@ not_found:
*ret = NULL;
return 0;
-#else
- r = manager_get_session_by_pid (m, pid, &s);
- if (r <= 0)
- return r;
- if (ret)
- *ret = u;
-
- *user = s->user;
-#endif // 0
}
int manager_get_idle_hint(Manager *m, dual_timestamp *t) {