[gdm/display-configuration] Add seat-id parameter when call OpenSessionWithParameters from GdmSessionWorker



commit ff0b34677e7eb3aecdd10b08e50daddec6ed3abb
Author: Halton Huo <halton huo sun com>
Date:   Tue Sep 15 17:23:48 2009 +0800

    Add seat-id parameter when call OpenSessionWithParameters from GdmSessionWorker
    This change is fix console-kit-daemon crash when user login with added feature
    "specify SEAT_ID when adding a new seat"
    
    At the same time, quering GdmDisplay D-Bus interface is a better way to get
    properties like display-type, seat-id. So I revert gdm_session_direct_new back
    without display-type.

 daemon/gdm-product-slave.c  |    4 -
 daemon/gdm-session-direct.c |  221 +++++++++++++++++++++++++++++++++++++------
 daemon/gdm-session-direct.h |    1 -
 daemon/gdm-session-worker.c |   19 ++++
 daemon/gdm-simple-slave.c   |    4 +-
 daemon/test-session.c       |    1 -
 6 files changed, 213 insertions(+), 37 deletions(-)
---
diff --git a/daemon/gdm-product-slave.c b/daemon/gdm-product-slave.c
index c767b53..2af3a46 100644
--- a/daemon/gdm-product-slave.c
+++ b/daemon/gdm-product-slave.c
@@ -800,7 +800,6 @@ create_new_session (GdmProductSlave *slave)
         gboolean       display_is_local;
         char          *display_id;
         char          *display_name;
-        char          *display_type;
         char          *display_hostname;
         char          *display_device;
         char          *display_x11_authority_file;
@@ -810,7 +809,6 @@ create_new_session (GdmProductSlave *slave)
         g_object_get (slave,
                       "display-id", &display_id,
                       "display-name", &display_name,
-                      "display-type", &display_type,
                       "display-hostname", &display_hostname,
                       "display-is-local", &display_is_local,
                       "display-x11-authority-file", &display_x11_authority_file,
@@ -821,14 +819,12 @@ create_new_session (GdmProductSlave *slave)
 
         slave->priv->session = gdm_session_direct_new (display_id,
                                                        display_name,
-                                                       display_type,
                                                        display_hostname,
                                                        display_device,
                                                        display_x11_authority_file,
                                                        display_is_local);
         g_free (display_id);
         g_free (display_name);
-        g_free (display_type);
         g_free (display_hostname);
         g_free (display_device);
 
diff --git a/daemon/gdm-session-direct.c b/daemon/gdm-session-direct.c
index 339f335..d6ca385 100644
--- a/daemon/gdm-session-direct.c
+++ b/daemon/gdm-session-direct.c
@@ -53,6 +53,8 @@
 #include "gdm-session-record.h"
 #include "gdm-session-worker-job.h"
 
+#define GDM_DBUS_NAME                 "org.gnome.DisplayManager"
+#define GDM_DBUS_DISPLAY_INTERFACE    "org.gnome.DisplayManager.Display"
 #define GDM_SESSION_DBUS_PATH         "/org/gnome/DisplayManager/Session"
 #define GDM_SESSION_DBUS_INTERFACE    "org.gnome.DisplayManager.Session"
 #define GDM_SESSION_DBUS_ERROR_CANCEL "org.gnome.DisplayManager.Session.Error.Cancel"
@@ -85,16 +87,18 @@ struct _GdmSessionDirectPrivate
         char                *id;
         char                *display_id;
         char                *display_name;
-        char                *display_type;
         char                *display_hostname;
         char                *display_device;
         char                *display_x11_authority_file;
         char                *display_console_session;
+        char                *display_type;
+        char                *display_seat_id;
         gboolean             display_is_local;
 
         DBusServer          *server;
         char                *server_address;
         GHashTable          *environment;
+        DBusGProxy          *display_proxy;
         DBusGConnection     *connection;
 };
 
@@ -102,13 +106,14 @@ enum {
         PROP_0,
         PROP_DISPLAY_ID,
         PROP_DISPLAY_NAME,
-        PROP_DISPLAY_TYPE,
         PROP_DISPLAY_HOSTNAME,
         PROP_DISPLAY_IS_LOCAL,
         PROP_DISPLAY_DEVICE,
         PROP_DISPLAY_X11_AUTHORITY_FILE,
         PROP_DISPLAY_CONSOLE_SESSION,
         PROP_USER_X11_AUTHORITY_FILE,
+        PROP_DISPLAY_TYPE,
+        PROP_DISPLAY_SEAT_ID,
 };
 
 static void     gdm_session_iface_init          (GdmSessionIface      *iface);
@@ -1301,6 +1306,7 @@ do_introspect (DBusConnection *connection,
                                "      <arg name=\"service_name\" type=\"s\"/>\n"
                                "      <arg name=\"x11_display_name\" type=\"s\"/>\n"
                                "      <arg name=\"x11_display_type\" type=\"s\"/>\n"
+                               "      <arg name=\"x11_display_seat_id\" type=\"s\"/>\n"
                                "      <arg name=\"display_device\" type=\"s\"/>\n"
                                "      <arg name=\"hostname\" type=\"s\"/>\n"
                                "      <arg name=\"x11_authority_file\" type=\"s\"/>\n"
@@ -1309,6 +1315,7 @@ do_introspect (DBusConnection *connection,
                                "      <arg name=\"service_name\" type=\"s\"/>\n"
                                "      <arg name=\"x11_display_name\" type=\"s\"/>\n"
                                "      <arg name=\"x11_display_type\" type=\"s\"/>\n"
+                               "      <arg name=\"x11_seat_id\" type=\"s\"/>\n"
                                "      <arg name=\"display_device\" type=\"s\"/>\n"
                                "      <arg name=\"hostname\" type=\"s\"/>\n"
                                "      <arg name=\"x11_authority_file\" type=\"s\"/>\n"
@@ -1692,6 +1699,7 @@ send_setup (GdmSessionDirect *session,
         DBusMessageIter iter;
         const char     *display_name;
         const char     *display_type;
+        const char     *display_seat_id;
         const char     *display_device;
         const char     *display_hostname;
         const char     *display_x11_authority_file;
@@ -1708,6 +1716,11 @@ send_setup (GdmSessionDirect *session,
         } else {
                 display_type = "";
         }
+        if (session->priv->display_seat_id!= NULL) {
+                display_seat_id = session->priv->display_seat_id;
+        } else {
+                display_seat_id = "";
+        }
         if (session->priv->display_hostname != NULL) {
                 display_hostname = session->priv->display_hostname;
         } else {
@@ -1734,6 +1747,7 @@ send_setup (GdmSessionDirect *session,
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &service_name);
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_name);
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_type);
+        dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_seat_id);
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_device);
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_hostname);
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_x11_authority_file);
@@ -1753,6 +1767,7 @@ send_setup_for_user (GdmSessionDirect *session,
         DBusMessageIter iter;
         const char     *display_name;
         const char     *display_type;
+        const char     *display_seat_id;
         const char     *display_device;
         const char     *display_hostname;
         const char     *display_x11_authority_file;
@@ -1770,6 +1785,11 @@ send_setup_for_user (GdmSessionDirect *session,
         } else {
                 display_type = "";
         }
+        if (session->priv->display_seat_id != NULL) {
+                display_seat_id = session->priv->display_seat_id;
+        } else {
+                display_seat_id = "";
+        }
         if (session->priv->display_hostname != NULL) {
                 display_hostname = session->priv->display_hostname;
         } else {
@@ -1801,6 +1821,7 @@ send_setup_for_user (GdmSessionDirect *session,
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &service_name);
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_name);
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_type);
+        dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_seat_id);
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_device);
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_hostname);
         dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &display_x11_authority_file);
@@ -2206,14 +2227,6 @@ _gdm_session_direct_set_display_name (GdmSessionDirect *session,
 }
 
 static void
-_gdm_session_direct_set_display_type (GdmSessionDirect *session,
-                                      const char       *type)
-{
-        g_free (session->priv->display_type);
-        session->priv->display_type = g_strdup (type);
-}
-
-static void
 _gdm_session_direct_set_display_hostname (GdmSessionDirect *session,
                                           const char       *name)
 {
@@ -2247,6 +2260,22 @@ _gdm_session_direct_set_display_x11_authority_file (GdmSessionDirect *session,
 }
 
 static void
+_gdm_session_direct_set_display_type (GdmSessionDirect *session,
+                                      const char       *type)
+{
+        g_free (session->priv->display_type);
+        session->priv->display_type = g_strdup (type);
+}
+
+static void
+_gdm_session_direct_set_display_seat_id (GdmSessionDirect *session,
+                                         const char       *sid)
+{
+        g_free (session->priv->display_seat_id);
+        session->priv->display_seat_id = g_strdup (sid);
+}
+
+static void
 _gdm_session_direct_set_display_console_session (GdmSessionDirect *session,
                                             const char       *console_session)
 {
@@ -2278,9 +2307,6 @@ gdm_session_direct_set_property (GObject      *object,
         case PROP_DISPLAY_NAME:
                 _gdm_session_direct_set_display_name (self, g_value_get_string (value));
                 break;
-        case PROP_DISPLAY_TYPE:
-                _gdm_session_direct_set_display_type (self, g_value_get_string (value));
-                break;
         case PROP_DISPLAY_HOSTNAME:
                 _gdm_session_direct_set_display_hostname (self, g_value_get_string (value));
                 break;
@@ -2299,6 +2325,12 @@ gdm_session_direct_set_property (GObject      *object,
         case PROP_DISPLAY_IS_LOCAL:
                 _gdm_session_direct_set_display_is_local (self, g_value_get_boolean (value));
                 break;
+        case PROP_DISPLAY_TYPE:
+                _gdm_session_direct_set_display_type (self, g_value_get_string (value));
+                break;
+        case PROP_DISPLAY_SEAT_ID:
+                _gdm_session_direct_set_display_seat_id (self, g_value_get_string (value));
+                break;
         default:
                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                 break;
@@ -2322,9 +2354,6 @@ gdm_session_direct_get_property (GObject    *object,
         case PROP_DISPLAY_NAME:
                 g_value_set_string (value, self->priv->display_name);
                 break;
-        case PROP_DISPLAY_TYPE:
-                g_value_set_string (value, self->priv->display_type);
-                break;
         case PROP_DISPLAY_HOSTNAME:
                 g_value_set_string (value, self->priv->display_hostname);
                 break;
@@ -2343,6 +2372,12 @@ gdm_session_direct_get_property (GObject    *object,
         case PROP_DISPLAY_IS_LOCAL:
                 g_value_set_boolean (value, self->priv->display_is_local);
                 break;
+        case PROP_DISPLAY_TYPE:
+                g_value_set_string (value, self->priv->display_type);
+                break;
+        case PROP_DISPLAY_SEAT_ID:
+                g_value_set_string (value, self->priv->display_seat_id);
+                break;
         default:
                 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
                 break;
@@ -2366,9 +2401,6 @@ gdm_session_direct_dispose (GObject *object)
         g_free (session->priv->display_name);
         session->priv->display_name = NULL;
 
-        g_free (session->priv->display_type);
-        session->priv->display_type = NULL;
-
         g_free (session->priv->display_hostname);
         session->priv->display_hostname = NULL;
 
@@ -2381,6 +2413,12 @@ gdm_session_direct_dispose (GObject *object)
         g_free (session->priv->server_address);
         session->priv->server_address = NULL;
 
+        g_free (session->priv->display_type);
+        session->priv->display_type = NULL;
+
+        g_free (session->priv->display_seat_id);
+        session->priv->display_seat_id = NULL;
+
         if (session->priv->server != NULL) {
                 dbus_server_disconnect (session->priv->server);
                 dbus_server_unref (session->priv->server);
@@ -2392,6 +2430,11 @@ gdm_session_direct_dispose (GObject *object)
                 session->priv->environment = NULL;
         }
 
+        if (session->priv->display_proxy != NULL) {
+                g_object_unref (session->priv->display_proxy);
+        }
+
+
         G_OBJECT_CLASS (gdm_session_direct_parent_class)->dispose (object);
 }
 
@@ -2521,13 +2564,6 @@ gdm_session_direct_class_init (GdmSessionDirectClass *session_class)
                                                               NULL,
                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
         g_object_class_install_property (object_class,
-                                         PROP_DISPLAY_TYPE,
-                                         g_param_spec_string ("display-type",
-                                                              "display type",
-                                                              "display type",
-                                                              NULL,
-                                                              G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-        g_object_class_install_property (object_class,
                                          PROP_DISPLAY_HOSTNAME,
                                          g_param_spec_string ("display-hostname",
                                                               "display hostname",
@@ -2571,15 +2607,143 @@ gdm_session_direct_class_init (GdmSessionDirectClass *session_class)
                                                               "display device",
                                                               NULL,
                                                               G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+        g_object_class_install_property (object_class,
+                                         PROP_DISPLAY_TYPE,
+                                         g_param_spec_string ("display-type",
+                                                              "display type",
+                                                              "display type",
+                                                              NULL,
+                                                              G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
+        g_object_class_install_property (object_class,
+                                         PROP_DISPLAY_SEAT_ID,
+                                         g_param_spec_string ("seat-id",
+                                                              "seat id",
+                                                              "seat id",
+                                                              NULL,
+                                                              G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
 
 
         dbus_g_object_type_install_info (GDM_TYPE_SESSION_DIRECT, &dbus_glib_gdm_session_direct_object_info);
 }
 
+static void
+display_proxy_destroyed_cb (DBusGProxy       *display_proxy,
+                            GdmSessionDirect *session)
+{
+        g_debug ("GdmSessionDirect: Disconnected from display");
+
+        session->priv->display_proxy = NULL;
+}
+
+static gboolean
+init_display_data (GdmSessionDirect *session)
+{
+        gboolean    res;
+        char       *id;
+        GError     *error;
+
+        g_assert (session->priv->display_proxy == NULL);
+
+        error = NULL; 
+        session->priv->connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, &error);
+        if (session->priv->connection == NULL) {
+                if (error != NULL) {
+                        g_critical ("error getting system bus: %s", error->message);
+                        g_error_free (error);
+                }
+                exit (1);
+        }
+
+        error = NULL;
+        session->priv->display_proxy = dbus_g_proxy_new_for_name_owner (
+                                                 session->priv->connection,
+                                                 GDM_DBUS_NAME,
+                                                 session->priv->display_id,
+                                                 GDM_DBUS_DISPLAY_INTERFACE,
+                                                 &error);
+
+        g_signal_connect (session->priv->display_proxy,
+                          "destroy",
+                          G_CALLBACK (display_proxy_destroyed_cb),
+                          session);
+
+        if (session->priv->display_proxy == NULL) {
+                if (error != NULL) {
+                        g_warning ("Failed to create display proxy %s: %s", session->priv->display_id, error->message);
+                        g_error_free (error);
+                } else {
+                        g_warning ("Unable to create display proxy");
+                }
+                return FALSE;
+        }
+
+        /* Make sure display ID works */
+        error = NULL;
+        res = dbus_g_proxy_call (session->priv->display_proxy,
+                                 "GetId",
+                                 &error,
+                                 G_TYPE_INVALID,
+                                 DBUS_TYPE_G_OBJECT_PATH, &id,
+                                 G_TYPE_INVALID);
+        if (! res) {
+                if (error != NULL) {
+                        g_warning ("Failed to get display id %s: %s", session->priv->display_id, error->message);
+                        g_error_free (error);
+                } else {
+                        g_warning ("Failed to get display id %s", session->priv->display_id);
+                }
+
+                return FALSE;
+        }
+
+        if (strcmp (id, session->priv->display_id) != 0) {
+                g_critical ("Display ID doesn't match");
+                exit (1);
+        }
+
+        error = NULL;
+        res = dbus_g_proxy_call (session->priv->display_proxy,
+                                 "GetX11DisplayType",
+                                 &error,
+                                 G_TYPE_INVALID,
+                                 G_TYPE_STRING, &session->priv->display_type,
+                                 G_TYPE_INVALID);
+        if (! res) {
+                if (error != NULL) {
+                        g_warning ("Failed to get value: %s", error->message);
+                        g_error_free (error);
+                } else {
+                        g_warning ("Failed to get value");
+                }
+        
+                return FALSE;    
+        }
+
+        error = NULL;
+        res = dbus_g_proxy_call (session->priv->display_proxy,
+                                 "GetSeatId",
+                                 &error,
+                                 G_TYPE_INVALID,
+                                 G_TYPE_STRING, &session->priv->display_seat_id,
+                                 G_TYPE_INVALID);
+        if (! res) {
+                if (error != NULL) {
+                        g_warning ("Failed to get value: %s", error->message);
+                        g_error_free (error);
+                } else {
+                        g_warning ("Failed to get value");
+                }
+
+                return FALSE;
+        }
+
+        return TRUE;
+}
+
+
 GdmSessionDirect *
 gdm_session_direct_new (const char *display_id,
                         const char *display_name,
-                        const char *display_type,
                         const char *display_hostname,
                         const char *display_device,
                         const char *display_x11_authority_file,
@@ -2590,13 +2754,14 @@ gdm_session_direct_new (const char *display_id,
         session = g_object_new (GDM_TYPE_SESSION_DIRECT,
                                 "display-id", display_id,
                                 "display-name", display_name,
-                                "display-type", display_type,
                                 "display-hostname", display_hostname,
                                 "display-device", display_device,
                                 "display-x11-authority-file", display_x11_authority_file,
                                 "display-is-local", display_is_local,
                                 NULL);
 
+        init_display_data (session);
+
         return session;
 }
 
diff --git a/daemon/gdm-session-direct.h b/daemon/gdm-session-direct.h
index 766aa0a..284d902 100644
--- a/daemon/gdm-session-direct.h
+++ b/daemon/gdm-session-direct.h
@@ -50,7 +50,6 @@ GType              gdm_session_direct_get_type                 (void);
 
 GdmSessionDirect * gdm_session_direct_new                      (const char *display_id,
                                                                 const char *display_name,
-                                                                const char *display_type,
                                                                 const char *display_hostname,
                                                                 const char *display_device,
                                                                 const char *display_x11_authority_file,
diff --git a/daemon/gdm-session-worker.c b/daemon/gdm-session-worker.c
index cbbf8ea..a5522b1 100644
--- a/daemon/gdm-session-worker.c
+++ b/daemon/gdm-session-worker.c
@@ -113,6 +113,7 @@ struct GdmSessionWorkerPrivate
         char             *service;
         char             *x11_display_name;
         char             *x11_display_type;
+        char             *seat_id;
         char             *x11_authority_file;
         char             *display_device;
         char             *hostname;
@@ -173,6 +174,7 @@ open_ck_session (GdmSessionWorker  *worker)
         DBusError      error;
         const char     *display_name;
         const char     *display_type;
+        const char     *seat_id;
         const char     *display_device;
         const char     *display_hostname;
         gboolean        is_local;
@@ -187,6 +189,11 @@ open_ck_session (GdmSessionWorker  *worker)
         } else {
                 display_type = "";
         }
+        if (worker->priv->seat_id != NULL) {
+                seat_id = worker->priv->seat_id;
+        } else {
+                seat_id = "";
+        }
         if (worker->priv->hostname != NULL) {
                 display_hostname = worker->priv->hostname;
         } else {
@@ -224,6 +231,7 @@ open_ck_session (GdmSessionWorker  *worker)
         res = ck_connector_open_session_with_parameters (worker->priv->ckc,
                                                          &error,
                                                          "display-type", &display_type,
+                                                         "seat-id", &seat_id,
                                                          "unix-user", &pwent->pw_uid,
                                                          "x11-display", &display_name,
                                                          "x11-display-device", &display_device,
@@ -2381,6 +2389,7 @@ on_setup (GdmSessionWorker *worker,
         const char *service;
         const char *x11_display_name;
         const char *x11_display_type;
+        const char *seat_id;
         const char *x11_authority_file;
         const char *console;
         const char *hostname;
@@ -2397,6 +2406,7 @@ on_setup (GdmSessionWorker *worker,
                                      DBUS_TYPE_STRING, &service,
                                      DBUS_TYPE_STRING, &x11_display_name,
                                      DBUS_TYPE_STRING, &x11_display_type,
+                                     DBUS_TYPE_STRING, &seat_id,
                                      DBUS_TYPE_STRING, &console,
                                      DBUS_TYPE_STRING, &hostname,
                                      DBUS_TYPE_STRING, &x11_authority_file,
@@ -2405,6 +2415,7 @@ on_setup (GdmSessionWorker *worker,
                 worker->priv->service = g_strdup (service);
                 worker->priv->x11_display_name = g_strdup (x11_display_name);
                 worker->priv->x11_display_type = g_strdup (x11_display_type);
+                worker->priv->seat_id = g_strdup (seat_id);
                 worker->priv->x11_authority_file = g_strdup (x11_authority_file);
                 worker->priv->display_device = g_strdup (console);
                 worker->priv->hostname = g_strdup (hostname);
@@ -2426,6 +2437,7 @@ on_setup_for_user (GdmSessionWorker *worker,
         const char *service;
         const char *x11_display_name;
         const char *x11_display_type;
+        const char *seat_id;
         const char *x11_authority_file;
         const char *console;
         const char *hostname;
@@ -2443,6 +2455,7 @@ on_setup_for_user (GdmSessionWorker *worker,
                                      DBUS_TYPE_STRING, &service,
                                      DBUS_TYPE_STRING, &x11_display_name,
                                      DBUS_TYPE_STRING, &x11_display_type,
+                                     DBUS_TYPE_STRING, &seat_id,
                                      DBUS_TYPE_STRING, &console,
                                      DBUS_TYPE_STRING, &hostname,
                                      DBUS_TYPE_STRING, &x11_authority_file,
@@ -2452,6 +2465,7 @@ on_setup_for_user (GdmSessionWorker *worker,
                 worker->priv->service = g_strdup (service);
                 worker->priv->x11_display_name = g_strdup (x11_display_name);
                 worker->priv->x11_display_type = g_strdup (x11_display_type);
+                worker->priv->seat_id = g_strdup (seat_id);
                 worker->priv->x11_authority_file = g_strdup (x11_authority_file);
                 worker->priv->display_device = g_strdup (console);
                 worker->priv->hostname = g_strdup (hostname);
@@ -2736,6 +2750,11 @@ gdm_session_worker_finalize (GObject *object)
                 worker->priv->x11_display_type = NULL;
         }
 
+        if (worker->priv->seat_id != NULL) {
+                g_free (worker->priv->seat_id);
+                worker->priv->seat_id = NULL;
+        }
+
         if (worker->priv->username != NULL) {
                 g_free (worker->priv->username);
                 worker->priv->username = NULL;
diff --git a/daemon/gdm-simple-slave.c b/daemon/gdm-simple-slave.c
index 11f798f..15850a9 100644
--- a/daemon/gdm-simple-slave.c
+++ b/daemon/gdm-simple-slave.c
@@ -588,7 +588,6 @@ create_new_session (GdmSimpleSlave *slave)
         gboolean       display_is_local;
         char          *display_id;
         char          *display_name;
-        char          *display_type;
         char          *display_hostname;
         char          *display_device;
         char          *display_x11_authority_file;
@@ -598,7 +597,6 @@ create_new_session (GdmSimpleSlave *slave)
         g_object_get (slave,
                       "display-id", &display_id,
                       "display-name", &display_name,
-                      "display-type", &display_type,
                       "display-hostname", &display_hostname,
                       "display-is-local", &display_is_local,
                       "display-x11-authority-file", &display_x11_authority_file,
@@ -611,7 +609,6 @@ create_new_session (GdmSimpleSlave *slave)
 
         slave->priv->session = gdm_session_direct_new (display_id,
                                                        display_name,
-                                                       display_type,
                                                        display_hostname,
                                                        display_device,
                                                        display_x11_authority_file,
@@ -620,6 +617,7 @@ create_new_session (GdmSimpleSlave *slave)
         g_free (display_name);
         g_free (display_device);
         g_free (display_hostname);
+        g_free (display_x11_authority_file);
 
         g_signal_connect (slave->priv->session,
                           "opened",
diff --git a/daemon/test-session.c b/daemon/test-session.c
index f59ccf3..c6a158c 100644
--- a/daemon/test-session.c
+++ b/daemon/test-session.c
@@ -244,7 +244,6 @@ main (int   argc,
                 g_debug ("creating instance of GdmSessionDirect object...");
                 session = gdm_session_direct_new ("/org/gnome/DisplayManager/Display1",
                                                   ":0",
-                                                  "",
                                                   g_get_host_name (),
                                                   ttyname (STDIN_FILENO),
                                                   getenv("XAUTHORITY"),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]