summaryrefslogtreecommitdiffstats
path: root/src/device.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-10-31 23:00:07 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-10-31 23:00:07 +0100
commit139c2014be451848fcc3fa31cdc07653148f596e (patch)
tree7fad1e13bdf7e4de8ac00bc1a38a3d1c73aee3f4 /src/device.c
parent56726c8298b40a3d9adda7f8df1861712ce0c8b6 (diff)
Make the variable prefix really global
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c
index 8fb46413..20e63d22 100644
--- a/src/device.c
+++ b/src/device.c
@@ -553,15 +553,14 @@ struct btd_device *device_create(DBusConnection *conn, struct btd_adapter *adapt
{
gchar *address_up;
struct btd_device *device;
- uint16_t dev_id = adapter_get_dev_id(adapter);
+ const gchar *adapter_path = adapter_get_path(adapter);
device = g_try_malloc0(sizeof(struct btd_device));
if (device == NULL)
return NULL;
address_up = g_ascii_strup(address, -1);
- device->path = g_strdup_printf("%s/hci%d/dev_%s", "/org/bluez",
- dev_id, address_up);
+ device->path = g_strdup_printf("%s/dev_%s", adapter_path, address_up);
g_strdelimit(device->path, ":", '_');
g_free(address_up);