aboutsummaryrefslogtreecommitdiffstats
path: root/src/device.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/device.c b/src/device.c
index 768ff31c..aeedf90a 100644
--- a/src/device.c
+++ b/src/device.c
@@ -458,8 +458,8 @@ static DBusMessage *set_alias(DBusConnection *conn, DBusMessage *msg,
ba2str(&device->bdaddr, dstaddr);
/* Remove alias if empty string */
- err = write_device_alias(srcaddr, dstaddr,
- g_str_equal(alias, "") ? NULL : alias);
+ err = write_device_alias(srcaddr, dstaddr, device->bdaddr_type,
+ g_str_equal(alias, "") ? NULL : alias);
if (err < 0)
return btd_error_failed(msg, strerror(-err));
@@ -1077,7 +1077,8 @@ struct btd_device *device_create(DBusConnection *conn,
ba2str(&src, srcaddr);
read_device_name(srcaddr, address, bdaddr_type, device->name);
- if (read_device_alias(srcaddr, address, alias, sizeof(alias)) == 0)
+ if (read_device_alias(srcaddr, address, bdaddr_type, alias,
+ sizeof(alias)) == 0)
device->alias = g_strdup(alias);
device->trusted = read_trust(&src, address, GLOBAL_TRUST);