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