summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2007-02-26 05:24:49 +0000
committerBrian Cameron <bcameron@src.gnome.org>2007-02-26 05:24:49 +0000
commitd7f34bb280d2007853c09a44e086746db4a33962 (patch)
tree58fb78e8c692dec82e68381fa9897df02cc8b1e3
parent46e155a6e0e515034d76173686beb032b3a64cfc (diff)
downloadgdm-d7f34bb280d2007853c09a44e086746db4a33962.tar.gz
Fix setting of PIPE_BUF to fix buf #409801 to fix Hurd support.
2007-02-26 Brian Cameron <brian.cameron@sun.com> * gui/gdmchooser.c: Fix setting of PIPE_BUF to fix buf #409801 to fix Hurd support. svn path=/trunk/; revision=4616
-rw-r--r--ChangeLog10
-rw-r--r--gui/gdmchooser.c20
2 files changed, 20 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index fe158466..a6f26931 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
2007-02-26 Brian Cameron <brian.cameron@sun.com>
+ * gui/gdmchooser.c: Fix setting of PIPE_BUF to fix buf #409801
+ to fix Hurd support.
+
+2007-02-26 Brian Cameron <brian.cameron@sun.com>
+
+ * gui/gdmlogin.c: Change Session mnemonic to "e" instead of "s"
+ so it doesn't conflict to "Start Again".
+
+2007-02-26 Brian Cameron <brian.cameron@sun.com>
+
* gui/gdmlogin.c: Change Session mnemonic to "e" instead of "s"
so it doesn't conflict to "Start Again".
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);