diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-03-20 20:46:56 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-03-20 20:46:56 +0000 |
commit | 74fdac28eafca963c8081ea39dcf057459cf491a (patch) | |
tree | b5b56f365b4bd803a627ef5315df425896378d3a /hcid | |
parent | 8b7917b9d76b2f8a7416366065432542bdcfbc38 (diff) |
Add Adapter property to device GetProperties.
Diffstat (limited to 'hcid')
-rw-r--r-- | hcid/device.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/hcid/device.c b/hcid/device.c index c16a6708..f5929861 100644 --- a/hcid/device.c +++ b/hcid/device.c @@ -757,10 +757,10 @@ static DBusHandlerResult get_properties(DBusConnection *conn, DBusMessageIter iter; DBusMessageIter dict; bdaddr_t src, dst; - char filename[PATH_MAX + 1]; + char filename[PATH_MAX + 1], path[MAX_PATH_LENGTH]; char buf[64]; const char *ptr; - char *str, *name; + char *str, *name, *ppath; dbus_bool_t boolean; uint32_t class; @@ -840,6 +840,12 @@ static DBusHandlerResult get_properties(DBusConnection *conn, dbus_message_iter_append_dict_entry(&dict, "UUIDs", DBUS_TYPE_ARRAY, device->uuids); + /* Adapter */ + snprintf(path, sizeof(path), "/hci%d", adapter->dev_id); + ppath = path; + dbus_message_iter_append_dict_entry(&dict, "Adapter", + DBUS_TYPE_STRING, &ppath); + dbus_message_iter_close_container(&iter, &dict); return send_message_and_unref(conn, reply); |