Commit 0c56a3b3 authored by Sven Neumann's avatar Sven Neumann Committed by Zeeshan Ali (Khattak)
Browse files

Simplify code in notify_available_cb()

Instead of calling g_hash_table_foreach_remove() with a callback
function that always returns TRUE, just call g_hash_table_remove_all().
parent c98446ac
......@@ -1387,14 +1387,6 @@ gupnp_service_constructor (GType type,
return object;
}
static gboolean
say_yes (gpointer key,
gpointer value,
gpointer user_data)
{
return TRUE;
}
/* Root device availability changed. */
static void
notify_available_cb (GObject *object,
......@@ -1407,9 +1399,7 @@ notify_available_cb (GObject *object,
if (!gupnp_root_device_get_available (GUPNP_ROOT_DEVICE (object))) {
/* Root device now unavailable: Purge subscriptions */
g_hash_table_foreach_remove (service->priv->subscriptions,
say_yes,
NULL);
g_hash_table_remove_all (service->priv->subscriptions);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment