summaryrefslogtreecommitdiff
path: root/daemon/gdm-display.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2009-03-16 20:15:55 +0000
committerRay Strode <halfline@src.gnome.org>2009-03-16 20:15:55 +0000
commit5e464319bdccf9a9c68496d31592ccf7766ce1a3 (patch)
treec69cebc9c3c81fb720d64a706c1e9302f683e58e /daemon/gdm-display.c
parent8a3490706e1a85d8607a117a0387e83764dfc9db (diff)
downloadgdm-5e464319bdccf9a9c68496d31592ccf7766ce1a3.tar.gz
Fix the GetX11Cookie dbus method Send the cookie as a byte array instead
2009-03-16 Ray Strode <rstrode@redhat.com> Fix the GetX11Cookie dbus method * daemon/gdm-display.xml: Send the cookie as a byte array instead of utf-8 string * daemon/gdm-display.[ch] (gdm_display_get_x11_cookie): pass in a GArray instead of the more natural char array and size pointers to make dbus-glib happy. * daemon/gdm-xdmcp-display-factory.c (gdm_xdmcp_handle_request): Update to use new get_x11_cookie signature. svn path=/trunk/; revision=6781
Diffstat (limited to 'daemon/gdm-display.c')
-rw-r--r--daemon/gdm-display.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index 323d941c..671857aa 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -416,19 +416,16 @@ gdm_display_remove_user_authorization (GdmDisplay *display,
gboolean
gdm_display_get_x11_cookie (GdmDisplay *display,
- char **x11_cookie,
- gsize *x11_cookie_size,
+ GArray **x11_cookie,
GError **error)
{
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
if (x11_cookie != NULL) {
- *x11_cookie = g_memdup (display->priv->x11_cookie,
- display->priv->x11_cookie_size);
- }
-
- if (x11_cookie_size != NULL) {
- *x11_cookie_size = display->priv->x11_cookie_size;
+ *x11_cookie = g_array_new (FALSE, FALSE, sizeof (char));
+ g_array_append_vals (*x11_cookie,
+ display->priv->x11_cookie,
+ display->priv->x11_cookie_size);
}
return TRUE;