From: Sjoerd Simons Date: Fri, 13 Jun 2008 11:11:49 +0000 (+0000) Subject: Remove entries from the GaEntryGroupService entry hashed using GaEntryGroupServiceEnt... X-Git-Url: https://git.meshlink.io/?a=commitdiff_plain;h=505fd1b5c1dadff46f4b50df76f9ee978351b3dc;p=catta 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 --- 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);