From d7f34bb280d2007853c09a44e086746db4a33962 Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Mon, 26 Feb 2007 05:24:49 +0000 Subject: Fix setting of PIPE_BUF to fix buf #409801 to fix Hurd support. 2007-02-26 Brian Cameron * gui/gdmchooser.c: Fix setting of PIPE_BUF to fix buf #409801 to fix Hurd support. svn path=/trunk/; revision=4616 --- ChangeLog | 10 ++++++++++ gui/gdmchooser.c | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe158466..a6f26931 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-02-26 Brian Cameron + + * gui/gdmchooser.c: Fix setting of PIPE_BUF to fix buf #409801 + to fix Hurd support. + +2007-02-26 Brian Cameron + + * gui/gdmlogin.c: Change Session mnemonic to "e" instead of "s" + so it doesn't conflict to "Start Again". + 2007-02-26 Brian Cameron * gui/gdmlogin.c: Change Session mnemonic to "e" instead of "s" diff --git a/gui/gdmchooser.c b/gui/gdmchooser.c index 2912df24..f5e8eba0 100644 --- a/gui/gdmchooser.c +++ b/gui/gdmchooser.c @@ -448,6 +448,14 @@ gdm_chooser_decode_packet (GIOChannel *source, int pipe_buf; gboolean host_not_willing = FALSE; +#ifdef PIPE_BUF + pipe_buf = PIPE_BUF; +#else + /* apparently Hurd doesn't have PIPE_BUF */ + pipe_buf = fpathconf (1 /*stdout*/, _PC_PIPE_BUF); + /* could return -1 if no limit */ +#endif + if ( ! (condition & G_IO_IN)) return TRUE; @@ -508,7 +516,7 @@ gdm_chooser_decode_packet (GIOChannel *source, hostname = hbuf; - if (strlen (hostname)+1 > PIPE_BUF) + if (strlen (hostname) + 1 > pipe_buf) goto done; hostname = g_strdup (hostname); @@ -531,7 +539,7 @@ gdm_chooser_decode_packet (GIOChannel *source, AF_INET); hostname = (he && he->h_name) ? he->h_name : inet_ntoa (clnt_sa.sin_addr); - if (strlen (hostname)+1 > PIPE_BUF) + if (strlen (hostname) + 1 > pipe_buf) goto done; hostname = g_strdup (hostname); @@ -544,14 +552,6 @@ gdm_chooser_decode_packet (GIOChannel *source, } } -#ifdef PIPE_BUF - pipe_buf = PIPE_BUF; -#else - /* apparently Hurd doesn't have PIPE_BUF */ - pipe_buf = fpathconf (1 /*stdout*/, _PC_PIPE_BUF); - /* could return -1 if no limit */ -#endif - /* We can't pipe hostnames larger than this */ if (pipe_buf > 0 && strlen (hostname)+1 > pipe_buf) { g_free (hostname); -- cgit v1.2.1