[vinagre] Don't show duplicated mDNS entries. Closes #587131.
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Don't show duplicated mDNS entries. Closes #587131.
- Date: Wed, 13 Oct 2010 18:26:35 +0000 (UTC)
commit 521fd3befc03b0015a08a0ea62347a43215917ca
Author: Jonh Wendell <jwendell gnome org>
Date: Wed Oct 13 15:31:50 2010 -0300
Don't show duplicated mDNS entries. Closes #587131.
vinagre/vinagre-mdns.c | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/vinagre/vinagre-mdns.c b/vinagre/vinagre-mdns.c
index c3e63d5..a2b2c2c 100644
--- a/vinagre/vinagre-mdns.c
+++ b/vinagre/vinagre-mdns.c
@@ -71,6 +71,7 @@ mdns_resolver_found (GaServiceResolver *resolver,
VinagreBookmarksEntry *entry;
BrowserEntry *b_entry;
char a[AVAHI_ADDRESS_STR_MAX], *u = NULL;
+ GSList *l;
b_entry = g_hash_table_lookup (mdns->priv->browsers, type);
if (!b_entry)
@@ -79,6 +80,15 @@ mdns_resolver_found (GaServiceResolver *resolver,
return;
}
+ for (l = mdns->priv->entries; l; l = l->next)
+ {
+ VinagreBookmarksEntry *entry = VINAGRE_BOOKMARKS_ENTRY (l->data);
+ if (strcmp (vinagre_connection_get_name (vinagre_bookmarks_entry_get_conn (entry)), name) == 0)
+ {
+ goto out;
+ }
+ }
+
for (; txt; txt = txt->next)
{
char *key, *value;
@@ -108,8 +118,11 @@ mdns_resolver_found (GaServiceResolver *resolver,
entry,
(GCompareFunc)vinagre_bookmarks_entry_compare);
- g_object_unref (resolver);
g_signal_emit (mdns, signals[MDNS_CHANGED], 0);
+
+out:
+ g_object_unref (resolver);
+ g_free (u);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]