diff options
author | Ray Strode <halfline@gmail.com> | 2019-02-21 20:46:23 +0000 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2019-02-21 20:46:23 +0000 |
commit | 00040c5cdfff67decc24cb1f95c2c23d7ce6a935 (patch) | |
tree | 7fd9889c9b7d688131a1a0c2093c30b0aa6a2c2e | |
parent | c2f011d9feb2b86bd4e9dbc267375c24df628825 (diff) | |
parent | a964604851c6c2dbba44e2571c8655fb2343e084 (diff) | |
download | gdm-00040c5cdfff67decc24cb1f95c2c23d7ce6a935.tar.gz |
Merge branch 'wip/foreach-fixes' into 'master'
correct gdm_display_store_foreach
See merge request GNOME/gdm!60
-rw-r--r-- | daemon/gdm-display-store.c | 16 | ||||
-rw-r--r-- | daemon/gdm-local-display-factory.c | 6 | ||||
-rw-r--r-- | daemon/gdm-manager.c | 5 | ||||
-rw-r--r-- | daemon/gdm-xdmcp-display-factory.c | 8 |
4 files changed, 18 insertions, 17 deletions
diff --git a/daemon/gdm-display-store.c b/daemon/gdm-display-store.c index fd24334e..910468cd 100644 --- a/daemon/gdm-display-store.c +++ b/daemon/gdm-display-store.c @@ -146,6 +146,16 @@ find_func (const char *id, closure->user_data); } +static void +foreach_func (const char *id, + StoredDisplay *stored_display, + FindClosure *closure) +{ + (void) closure->predicate (id, + stored_display->display, + closure->user_data); +} + void gdm_display_store_foreach (GdmDisplayStore *store, GdmDisplayStoreFunc func, @@ -159,9 +169,9 @@ gdm_display_store_foreach (GdmDisplayStore *store, closure.predicate = func; closure.user_data = user_data; - g_hash_table_find (store->priv->displays, - (GHRFunc) find_func, - &closure); + g_hash_table_foreach (store->priv->displays, + (GHFunc) foreach_func, + &closure); } GdmDisplay * diff --git a/daemon/gdm-local-display-factory.c b/daemon/gdm-local-display-factory.c index 5b9a48a1..98daca48 100644 --- a/daemon/gdm-local-display-factory.c +++ b/daemon/gdm-local-display-factory.c @@ -270,20 +270,18 @@ gdm_local_display_factory_create_transient_display (GdmLocalDisplayFactory *fact return ret; } -static gboolean +static void finish_display_on_seat_if_waiting (GdmDisplayStore *display_store, GdmDisplay *display, const char *seat_id) { if (gdm_display_get_status (display) != GDM_DISPLAY_WAITING_TO_FINISH) - return FALSE; + return; g_debug ("GdmLocalDisplayFactory: finish background display\n"); gdm_display_stop_greeter_session (display); gdm_display_unmanage (display); gdm_display_finish (display); - - return FALSE; } static void diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c index 2dea45e5..980aa62d 100644 --- a/daemon/gdm-manager.c +++ b/daemon/gdm-manager.c @@ -2424,15 +2424,12 @@ gdm_manager_error_quark (void) return ret; } -static gboolean +static void listify_display_ids (const char *id, GdmDisplay *display, GPtrArray **array) { g_ptr_array_add (*array, g_strdup (id)); - - /* return FALSE to continue */ - return FALSE; } /* diff --git a/daemon/gdm-xdmcp-display-factory.c b/daemon/gdm-xdmcp-display-factory.c index 270685d0..220ee3af 100644 --- a/daemon/gdm-xdmcp-display-factory.c +++ b/daemon/gdm-xdmcp-display-factory.c @@ -666,7 +666,7 @@ typedef struct { int count; } CountDisplayData; -static gboolean +static void count_displays_from_host (const char *id, GdmDisplay *display, CountDisplayData *data) @@ -680,8 +680,6 @@ count_displays_from_host (const char *id, data->count++; } } - - return TRUE; } static int @@ -1807,7 +1805,7 @@ gdm_xdmcp_send_got_managed_forward (GdmXdmcpDisplayFactory *factory, (int)gdm_sockaddr_len (gdm_address_peek_sockaddr_storage (address))); } -static gboolean +static void count_sessions (const char *id, GdmDisplay *display, GdmXdmcpDisplayFactory *factory) @@ -1823,8 +1821,6 @@ count_sessions (const char *id, factory->num_pending_sessions++; } } - - return TRUE; } static void |