summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2006-11-01 09:07:04 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2006-11-01 09:07:04 +0000
commitee22553d08142c42f9ec8af8813632198f8146a3 (patch)
treed5bfc575d6d917a6ab43b4ba7a1aa4887e0bda0e
parent0227b790178ae676c3b01f9940285c6f79f1f0bb (diff)
Missing unregister the service records when the agent is unregistered
-rw-r--r--hcid/dbus-service.c6
1 files changed, 5 insertions, 1 deletions
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;