diff options
author | Brian Cameron <brian.cameron@sun.com> | 2007-11-27 17:42:06 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2007-11-27 17:42:06 +0000 |
commit | 2c9d979e8cd4dbd0aa5378640f856c599fc6e4b1 (patch) | |
tree | 230ce486b10a2dab2ca9083062b38cff7431ac3c | |
parent | bd9b5c964f0158fbb2f7f7b75fb536774c0d3381 (diff) | |
download | gdm-2c9d979e8cd4dbd0aa5378640f856c599fc6e4b1.tar.gz |
Fix counting of number of open sessions. Close the XDMCP socket in the
2007-11-27 Brian Cameron <brian.cameron@sun.com>
* daemon/gdm-xdmcp-manager.[ch]: Fix counting of number of
open sessions. Close the XDMCP socket in the finalize function.
Otherwise gdm-restart does not allow XDMCP connections.
Remove unused function gdm_xdmcp_manager_stop. Fixes bug
#495623. Patch by Andrew Ziem <ahziem1@mailbolt.com>
svn path=/branches/gnome-2-20/; revision=5531
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | daemon/gdm-xdmcp-manager.c | 27 | ||||
-rw-r--r-- | daemon/gdm-xdmcp-manager.h | 2 |
3 files changed, 14 insertions, 23 deletions
@@ -1,3 +1,11 @@ +2007-11-27 Brian Cameron <brian.cameron@sun.com> + + * daemon/gdm-xdmcp-manager.[ch]: Fix counting of number of + open sessions. Close the XDMCP socket in the finalize function. + Otherwise gdm-restart does not allow XDMCP connections. + Remove unused function gdm_xdmcp_manager_stop. Fixes bug + #495623. Patch by Andrew Ziem <ahziem1@mailbolt.com> + 2007-11-26 Brian Cameron <brian.cameron@sun.com> * Release 2.20.2: diff --git a/daemon/gdm-xdmcp-manager.c b/daemon/gdm-xdmcp-manager.c index c6855b6a..98f00050 100644 --- a/daemon/gdm-xdmcp-manager.c +++ b/daemon/gdm-xdmcp-manager.c @@ -1852,7 +1852,7 @@ gdm_xdmcp_handle_request (GdmXdmcpManager *manager, /* Update num_sessions only if the length of the list that contain * them is smaller */ - if (g_list_length (gdm_daemon_config_get_display_list()) < manager->priv->num_sessions ){ + if (g_slist_length (gdm_daemon_config_get_display_list()) < manager->priv->num_sessions ) { gdm_xdmcp_recount_sessions (manager); } @@ -2591,26 +2591,6 @@ gdm_xdmcp_manager_start (GdmXdmcpManager *manager, return ret; } -gboolean -gdm_xdmcp_manager_stop (GdmXdmcpManager *manager, - GError **error) -{ - g_return_val_if_fail (GDM_IS_XDMCP_MANAGER (manager), FALSE); - g_return_val_if_fail (manager->priv->socket_fd != -1, FALSE); - - if (manager->priv->socket_watch_id > 0) { - g_source_remove (manager->priv->socket_watch_id); - manager->priv->socket_watch_id = 0; - } - - if (manager->priv->socket_fd > 0) { - VE_IGNORE_EINTR (close (manager->priv->socket_fd)); - manager->priv->socket_fd = -1; - } - - return TRUE; -} - void gdm_xdmcp_manager_set_port (GdmXdmcpManager *manager, guint port) @@ -2928,6 +2908,11 @@ gdm_xdmcp_manager_finalize (GObject *object) g_source_remove (manager->priv->socket_watch_id); } + if (manager->priv->socket_fd > 0) { + VE_IGNORE_EINTR (close (manager->priv->socket_fd)); + manager->priv->socket_fd = -1; + } + g_slist_free (manager->priv->forward_queries); g_slist_free (manager->priv->managed_forwards); diff --git a/daemon/gdm-xdmcp-manager.h b/daemon/gdm-xdmcp-manager.h index fe12ddc5..fb24b47b 100644 --- a/daemon/gdm-xdmcp-manager.h +++ b/daemon/gdm-xdmcp-manager.h @@ -62,8 +62,6 @@ void gdm_xdmcp_manager_set_port (GdmXdmcpManager * guint port); gboolean gdm_xdmcp_manager_start (GdmXdmcpManager *manager, GError **error); -gboolean gdm_xdmcp_manager_stop (GdmXdmcpManager *manager, - GError **error); G_END_DECLS |