Blame SOURCES/0010-chooser-fix-duplicate-entry-in-the-list.patch

75a7a3
From e3530d3ee97df1f78c15172abb0511ce12f1175b Mon Sep 17 00:00:00 2001
75a7a3
From: Ray Strode <rstrode@redhat.com>
75a7a3
Date: Fri, 31 Mar 2017 15:11:03 -0400
75a7a3
Subject: [PATCH 10/13] chooser: fix duplicate entry in the list
75a7a3
75a7a3
---
75a7a3
 chooser/gdm-host-chooser-widget.c | 2 +-
75a7a3
 1 file changed, 1 insertion(+), 1 deletion(-)
75a7a3
75a7a3
diff --git a/chooser/gdm-host-chooser-widget.c b/chooser/gdm-host-chooser-widget.c
75a7a3
index f9200aa0..b8924618 100644
75a7a3
--- a/chooser/gdm-host-chooser-widget.c
75a7a3
+++ b/chooser/gdm-host-chooser-widget.c
75a7a3
@@ -246,62 +246,62 @@ decode_packet (GIOChannel           *source,
75a7a3
                 }
75a7a3
 
75a7a3
                 if (! XdmcpReadARRAY8 (&buf, &stat)) {
75a7a3
                         goto done;
75a7a3
                 }
75a7a3
 
75a7a3
                 status = g_strndup ((char *) stat.data, MIN (stat.length, 256));
75a7a3
         } else if (header.opcode == UNWILLING) {
75a7a3
                 /* immaterial, will not be shown */
75a7a3
                 status = NULL;
75a7a3
         } else {
75a7a3
                 goto done;
75a7a3
         }
75a7a3
 
75a7a3
         g_debug ("STATUS: %s", status);
75a7a3
 
75a7a3
         chooser_host = find_known_host (widget, address);
75a7a3
         if (chooser_host == NULL) {
75a7a3
                 chooser_host = g_object_new (GDM_TYPE_CHOOSER_HOST,
75a7a3
                                              "address", address,
75a7a3
                                              "description", status,
75a7a3
                                              "willing", (header.opcode == WILLING),
75a7a3
                                              "kind", GDM_CHOOSER_HOST_KIND_XDMCP,
75a7a3
                                              NULL);
75a7a3
                 chooser_host_add (widget, chooser_host);
75a7a3
                 browser_add_host (widget, chooser_host);
75a7a3
         } else {
75a7a3
                 /* server changed it's mind */
75a7a3
                 if (header.opcode == WILLING
75a7a3
                     && ! gdm_chooser_host_get_willing (chooser_host)) {
75a7a3
-                        g_object_set (chooser_host, "willing", TRUE, NULL);
75a7a3
                         browser_add_host (widget, chooser_host);
75a7a3
+                        g_object_set (chooser_host, "willing", TRUE, NULL);
75a7a3
                 }
75a7a3
                 /* FIXME: handle unwilling? */
75a7a3
         }
75a7a3
 
75a7a3
  done:
75a7a3
         if (header.opcode == WILLING) {
75a7a3
                 XdmcpDisposeARRAY8 (&auth);
75a7a3
                 XdmcpDisposeARRAY8 (&host);
75a7a3
                 XdmcpDisposeARRAY8 (&stat;;
75a7a3
         }
75a7a3
 
75a7a3
         g_free (status);
75a7a3
         gdm_address_free (address);
75a7a3
 
75a7a3
         return TRUE;
75a7a3
 }
75a7a3
 
75a7a3
 static void
75a7a3
 do_ping (GdmHostChooserWidget *widget,
75a7a3
          gboolean              full)
75a7a3
 {
75a7a3
         GSList *l;
75a7a3
 
75a7a3
         g_debug ("do ping full:%d", full);
75a7a3
 
75a7a3
         for (l = widget->priv->broadcast_addresses; l != NULL; l = l->next) {
75a7a3
                 GdmAddress              *address;
75a7a3
                 int                      res;
75a7a3
 
75a7a3
                 address = l->data;
75a7a3
-- 
75a7a3
2.12.0
75a7a3