diff options
author | Johan Hedberg <johan.hedberg@nokia.com> | 2008-06-03 16:26:42 +0000 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@nokia.com> | 2008-06-03 16:26:42 +0000 |
commit | edbb9a6396085fb857f4c35e5a5c931aca633b35 (patch) | |
tree | 94b221a7a07f01014e14897fdca235ef6e250e85 /hcid/dbus-hci.c | |
parent | ba93a9b86c21e876d5adff98f3084d7a8b1a3811 (diff) |
Rework new agent logic
Diffstat (limited to 'hcid/dbus-hci.c')
-rw-r--r-- | hcid/dbus-hci.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hcid/dbus-hci.c b/hcid/dbus-hci.c index 679170ff..1b7c9cfa 100644 --- a/hcid/dbus-hci.c +++ b/hcid/dbus-hci.c @@ -63,6 +63,9 @@ static DBusConnection *connection = NULL; void bonding_request_free(struct bonding_request_info *bonding) { + struct device *device; + char address[18]; + if (!bonding) return; @@ -75,6 +78,14 @@ void bonding_request_free(struct bonding_request_info *bonding) if (bonding->io) g_io_channel_unref(bonding->io); + ba2str(&bonding->bdaddr, address); + + device = adapter_get_device(connection, bonding->adapter, address); + if (device && device->agent) { + agent_destroy(device->agent, FALSE); + device->agent = NULL; + } + g_free(bonding); } |