summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2007-02-26 07:31:53 +0000
committerBrian Cameron <bcameron@src.gnome.org>2007-02-26 07:31:53 +0000
commit6d4be80ce0c2ef38c30381473e22afccacda7c3d (patch)
tree4abd9821a839264094b7779f02ef73fbfbe435bd
parente92540ef19d2744d12503a32ed40573543aaa8ef (diff)
downloadgdm-6d4be80ce0c2ef38c30381473e22afccacda7c3d.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=/branches/gnome-2-16/; revision=4618
-rw-r--r--ChangeLog5
-rw-r--r--gui/gdmchooser.c24
2 files changed, 18 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 104dffa8..2a47d53a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2006-02-14 Brian Cameron <brian.cameron@sun.com>
* gui/gdmdynamic.c: Fix comparison with string literal.
diff --git a/gui/gdmchooser.c b/gui/gdmchooser.c
index dc63df90..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);
@@ -1798,6 +1798,8 @@ gdm_read_config (void)
gdm_config_get_bool (GDM_KEY_MULTICAST);
gdmcomm_comm_bulk_stop ();
+
+ return FALSE;
}
static gboolean
@@ -2065,7 +2067,7 @@ main (int argc, char *argv[])
}
}
gdm_chooser_xdmcp_init (hosts_opt);
- g_strfreev (chooser_hosts);
+ g_strfreev (hosts_opt);
sid = g_signal_lookup ("event",
GTK_TYPE_WIDGET);