diff options
author | Alok Barsode <alok.barsode@azingo.com> | 2008-07-09 13:19:43 +0530 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@indt.org.br> | 2008-07-28 10:34:42 -0300 |
commit | a2335a65bb61313b3e46be861c90ca8bdb786eb8 (patch) | |
tree | 0b3a6bc85393de6d4608013b6cb3eb2b1ba9d361 /hcid/adapter.c | |
parent | 46fd7beaa5b27f74e64d77449247e5459d7a3084 (diff) |
Adding device_get_agent.
Signed-off-by: Alok Barsode <alok.barsode@azingo.com>
Diffstat (limited to 'hcid/adapter.c')
-rw-r--r-- | hcid/adapter.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c index e70f31c2..753a1c47 100644 --- a/hcid/adapter.c +++ b/hcid/adapter.c @@ -746,6 +746,7 @@ void adapter_remove_device(DBusConnection *conn, struct adapter *adapter, bdaddr_t src; const gchar *destination = device_get_address(device); const gchar *dev_path = device_get_path(device); + struct agent *agent; str2ba(adapter->address, &src); delete_entry(&src, "profiles", destination); @@ -760,8 +761,10 @@ void adapter_remove_device(DBusConnection *conn, struct adapter *adapter, DBUS_TYPE_INVALID); } - if (device->agent) { - agent_destroy(device->agent, FALSE); + agent = device_get_agent(device); + + if (agent) { + agent_destroy(agent, FALSE); device->agent = NULL; } |