From 505fd1b5c1dadff46f4b50df76f9ee978351b3dc Mon Sep 17 00:00:00 2001 From: Sjoerd Simons Date: Fri, 13 Jun 2008 11:11:49 +0000 Subject: [PATCH] Remove entries from the GaEntryGroupService entry hashed using GaEntryGroupServiceEntry instead of strings. Fixes crash when calling ga_entry_group_service_remove_key git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1784 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-gobject/ga-entry-group.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/avahi-gobject/ga-entry-group.c b/avahi-gobject/ga-entry-group.c index cfe12f6..c4f2e37 100644 --- a/avahi-gobject/ga-entry-group.c +++ b/avahi-gobject/ga-entry-group.c @@ -556,8 +556,12 @@ gboolean ga_entry_group_service_set_arbitrary(GaEntryGroupService * service, gboolean ga_entry_group_service_remove_key(GaEntryGroupService * service, const gchar * key, GError ** error) { GaEntryGroupServicePrivate *priv = (GaEntryGroupServicePrivate *) service; + GaEntryGroupServiceEntry entry; - g_hash_table_remove(priv->entries, key); + entry.value = key; + entry.size = strlen(key); + + g_hash_table_remove(priv->entries, &entry); if (!priv->frozen) return ga_entry_group_service_thaw(service, error); -- 2.39.5