[vinagre] Fixed logic for removing mdns entries
- From: Jonh Wendell <jwendell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vinagre] Fixed logic for removing mdns entries
- Date: Wed, 13 Oct 2010 17:48:03 +0000 (UTC)
commit fb77551e8754a52fa86edcca45d810922f0cdff8
Author: Jonh Wendell <jwendell gnome org>
Date: Wed Oct 13 14:51:52 2010 -0300
Fixed logic for removing mdns entries
Also, don't emit the changed signal when a protocol is removed
vinagre/vinagre-mdns.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/vinagre/vinagre-mdns.c b/vinagre/vinagre-mdns.c
index bebad48..b989ec9 100644
--- a/vinagre/vinagre-mdns.c
+++ b/vinagre/vinagre-mdns.c
@@ -248,22 +248,18 @@ vinagre_mdns_add_service (VinagreMdns *mdns,
static void
vinagre_mdns_remove_entries_by_protocol (VinagreMdns *mdns, const gchar *protocol)
{
- GSList *l;
- gboolean changed = FALSE;
+ GSList *l, *next;
- for (l = mdns->priv->entries; l; l = l->next)
+ for (l = mdns->priv->entries; l; l = next)
{
VinagreBookmarksEntry *entry = VINAGRE_BOOKMARKS_ENTRY (l->data);
+ next = l->next;
if (strcmp (vinagre_connection_get_protocol (vinagre_bookmarks_entry_get_conn (entry)), protocol) == 0)
{
mdns->priv->entries = g_slist_remove (mdns->priv->entries, entry);
g_object_unref (entry);
- changed = TRUE;
}
}
-
- if (changed)
- g_signal_emit (mdns, signals[MDNS_CHANGED], 0);
}
static void
@@ -288,7 +284,6 @@ protocol_removed_cb (VinagrePluginsEngine *engine,
vinagre_mdns_remove_entries_by_protocol (mdns,
vinagre_protocol_get_protocol (protocol));
g_hash_table_remove (mdns->priv->browsers, (gconstpointer)service);
-
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]