diff options
author | Ray Strode <rstrode@redhat.com> | 2018-08-02 14:00:46 -0400 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2018-08-02 20:06:36 +0000 |
commit | 6574b4f2705ae7e37e7e57d6b57190094c2467c7 (patch) | |
tree | 8989badf799606ca03da00520375010675896e1f /common | |
parent | 0e9f09da4897bdc4069298c8a4d189cd7f217f81 (diff) | |
download | gdm-6574b4f2705ae7e37e7e57d6b57190094c2467c7.tar.gz |
common: dedupe activate_session_id
Right now there are three copies of activate_session_id.
This commit consolidates the code to gdm-common.c
Diffstat (limited to 'common')
-rw-r--r-- | common/gdm-common.c | 10 | ||||
-rw-r--r-- | common/gdm-common.h | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/common/gdm-common.c b/common/gdm-common.c index 613511c4..d807c019 100644 --- a/common/gdm-common.c +++ b/common/gdm-common.c @@ -352,10 +352,10 @@ create_transient_display (GDBusConnection *connection, return TRUE; } -static gboolean -activate_session_id (GDBusConnection *connection, - const char *seat_id, - const char *session_id) +gboolean +gdm_activate_session_by_id (GDBusConnection *connection, + const char *seat_id, + const char *session_id) { GError *local_error = NULL; GVariant *reply; @@ -529,7 +529,7 @@ goto_login_session (GDBusConnection *connection, res = gdm_get_login_window_session_id (seat_id, &session_id); if (res && session_id != NULL) { - res = activate_session_id (connection, seat_id, session_id); + res = gdm_activate_session_by_id (connection, seat_id, session_id); if (res) { ret = TRUE; diff --git a/common/gdm-common.h b/common/gdm-common.h index bd8ac705..07812b10 100644 --- a/common/gdm-common.h +++ b/common/gdm-common.h @@ -22,6 +22,8 @@ #define _GDM_COMMON_H #include <glib-unix.h> +#include <gio/gio.h> + #include <pwd.h> #include <errno.h> @@ -71,6 +73,10 @@ char * gdm_shell_expand (const char *str, GdmExpandVarFunc expand_func, gpointer user_data); +gboolean gdm_activate_session_by_id (GDBusConnection *connection, + const char *seat_id, + const char *session_id); + G_END_DECLS #endif /* _GDM_COMMON_H */ |