[gdm/wip/weak-ref-removal: 2/6] libgdm: fix pointer/boolean task confusion



commit 7138300fcc13c186243d73e5e3a24b238b446584
Author: Ray Strode <rstrode redhat com>
Date:   Mon May 14 15:49:50 2018 -0400

    libgdm: fix pointer/boolean task confusion
    
    The manager fetching code in GdmClient treats its task
    return value as boolean, but it's actually a pointer (the manager)
    
    This commit corrects the confusion.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795940

 libgdm/gdm-client.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libgdm/gdm-client.c b/libgdm/gdm-client.c
index 61bcbd3..a4a0e28 100644
--- a/libgdm/gdm-client.c
+++ b/libgdm/gdm-client.c
@@ -390,11 +390,13 @@ on_got_manager_for_reauthentication (GdmClient           *client,
                                      GTask               *task)
 {
         GCancellable *cancellable;
+        GdmManager   *manager;
         char         *username;
         GError       *error;
 
         error = NULL;
-        if (!g_task_propagate_boolean (G_TASK (result), &error)) {
+        manager = g_task_propagate_pointer (G_TASK (result), &error);
+        if (manager == NULL) {
                 g_task_return_error (task, error);
                 g_object_unref (task);
                 return;
@@ -530,10 +532,12 @@ on_got_manager_for_opening_connection (GdmClient           *client,
                                        GTask               *task)
 {
         GCancellable *cancellable;
+        GdmManager   *manager;
         GError       *error;
 
         error = NULL;
-        if (!g_task_propagate_boolean (G_TASK (result), &error)) {
+        manager = g_task_propagate_pointer (G_TASK (result), &error);
+        if (manager == NULL) {
                 g_task_return_error (task, error);
                 g_object_unref (task);
                 return;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]