summaryrefslogtreecommitdiffstats
path: root/hcid
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-06-06 08:50:28 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-06-06 08:50:28 +0000
commit127c0f3a59b07790425adeb154e0de501a33b808 (patch)
tree722d252dcb67ef49afc3825f875a2f1965ce9b91 /hcid
parentda2de444d0c8c3948994817bcbd2f27e1a92203d (diff)
Remove device specific agent before removing device object
Diffstat (limited to 'hcid')
-rw-r--r--hcid/adapter.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c
index 09248528..4374cef4 100644
--- a/hcid/adapter.c
+++ b/hcid/adapter.c
@@ -2438,6 +2438,11 @@ void adapter_remove_device(DBusConnection *conn, struct adapter *adapter,
DBUS_TYPE_INVALID);
}
+ if (device->agent) {
+ agent_destroy(device->agent, FALSE);
+ device->agent = NULL;
+ }
+
device_remove(device, conn);
adapter->devices = g_slist_remove(adapter->devices, device);
}