From ee22553d08142c42f9ec8af8813632198f8146a3 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Wed, 1 Nov 2006 09:07:04 +0000 Subject: Missing unregister the service records when the agent is unregistered --- hcid/dbus-service.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'hcid') diff --git a/hcid/dbus-service.c b/hcid/dbus-service.c index 9a6a56ee..76d7660f 100644 --- a/hcid/dbus-service.c +++ b/hcid/dbus-service.c @@ -785,8 +785,12 @@ int unregister_service_agent(DBusConnection *conn, const char *sender, const cha debug("Unregistering service object: %s", path); - if (dbus_connection_get_object_path_data(conn, path, (void *) &agent)) + if (dbus_connection_get_object_path_data(conn, path, (void *) &agent)) { + if (agent->records) + unregister_agent_records(agent->records); + service_agent_free(agent); + } if (!dbus_connection_unregister_object_path(conn, path)) return -1; -- cgit