diff options
author | Alok Barsode <alok.barsode@azingo.com> | 2008-07-09 12:52:59 +0530 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@indt.org.br> | 2008-07-28 10:34:05 -0300 |
commit | aec749f0732638f182c4b50fb59d6c905a80d42d (patch) | |
tree | 57ad0e42a5bb1e5cff4e93994bbc005c2675525a /hcid/adapter.c | |
parent | dcf5298e8173e946e3ac2ef6150ad78d030b15d0 (diff) |
Adding device_get_address.
Signed-off-by: Alok Barsode <alok.barsode@azingo.com>
Diffstat (limited to 'hcid/adapter.c')
-rw-r--r-- | hcid/adapter.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/hcid/adapter.c b/hcid/adapter.c index 63414390..45791734 100644 --- a/hcid/adapter.c +++ b/hcid/adapter.c @@ -278,6 +278,7 @@ static struct bonding_request_info *bonding_request_new(DBusConnection *conn, struct bonding_request_info *bonding; struct device *device; const char *name = dbus_message_get_sender(msg); + const gchar *destination; debug("bonding_request_new(%s)", address); @@ -285,10 +286,13 @@ static struct bonding_request_info *bonding_request_new(DBusConnection *conn, if (!device) return NULL; + destination = device_get_address(device); device->agent = agent_create(adapter, name, agent_path, - capability, device_agent_removed, device); + capability, + device_agent_removed, + device); debug("Temporary agent registered for hci%d/%s at %s:%s", - adapter->dev_id, device->address, name, + adapter->dev_id, destination, name, agent_path); bonding = g_new0(struct bonding_request_info, 1); @@ -737,11 +741,12 @@ void adapter_remove_device(DBusConnection *conn, struct adapter *adapter, struct device *device) { bdaddr_t src; + const gchar *destination = device_get_address(device); str2ba(adapter->address, &src); - delete_entry(&src, "profiles", device->address); + delete_entry(&src, "profiles", destination); - remove_bonding(conn, NULL, device->address, adapter); + remove_bonding(conn, NULL, destination, adapter); if (!device->temporary) { g_dbus_emit_signal(conn, adapter->path, |